Uhh, the last part of the question is confusing, so I'll cut it to "You mean you want to use multiple format specifiers?".
And to answer that: yes. I do want to use multiple.
Please check the end of the article, I edited it to show how to use multiple format specifiers at once. As for the reversion, the format specifier only applies to one console log, so the next console log won't have styles applied.
Here you go: console.log("%cThis will be formatted with blue text", "color: blue", "This will not be formatted at all, even though we are inside the same console log.");
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Uhh, the last part of the question is confusing, so I'll cut it to "You mean you want to use multiple format specifiers?".
And to answer that: yes. I do want to use multiple.
Though, what if I want to revert to the default? Since I know I can (probably) use multiple
%c
, but I wouldn't know how to revert the%c
.Please check the end of the article, I edited it to show how to use multiple format specifiers at once. As for the reversion, the format specifier only applies to one console log, so the next console log won't have styles applied.
I know. But what if I want to revert in the middle of my console log?
Here you go: console.log("%cThis will be formatted with blue text", "color: blue", "This will not be formatted at all, even though we are inside the same console log.");