Water a
It only takes about a minute
I often accidentally open the developer tool in Nuggets and see the nuggets want AD
Yo, there’s an arrow. Click it
Yes, it looks very interesting
This console how to write really do not know, but it does not matter, his source!
console.log("-- -- -- -- -- -- -- -- -- -- -")
this.outputGroup([""."Nuggets restaurant looking for front end chef:".""."Located in Wangjing, the kitchen equipment is advanced, the food material is delicious, 10 to 7, Saturday day is closed.".""."Signature dishes include stir-fried vue.js, braised Node.js, Chrome Stew Extension, Kung Pao Panfish...".""."Pay attention to hygiene, take pleasure in cooking, and have the heart of excellent cooking; Familiar with basic cooking theory is preferred, can develop new dishes is preferred.".""."Resume" FROM_JUEJIN_CONSOLE "to: [email protected]."].join("\n"),"Why do bugs persist? Why does the page fail to load? Why are elements hard to align? Is all this a distortion of human nature or a loss of morality?")
console.log("-- -- -- -- -- -- -- -- -- -- -")}}
{key:"outputGroup".value:function(e,t){"function"= =typeof console.groupCollapsed? (console.groupCollapsed(t),console.log(e),console.groupEnd()):(console.log(t),console.log("-- -- -- -- -- -- -- -- -- -- -"),console.log(e),console.log("-- -- -- -- -- -- -- -- -- -- -"))}}])
Copy the code
Collapsed(t),console.log(e),console.groupEnd()
Then go to MDN, scroll through API, hyperlink
It’s like you don’t understand it at all, so let’s just do a demo
The code is as follows:
console.groupCollapsed('This is the outside.');
console.log('This is the inside.');
console.groupEnd();
Copy the code
Run as follows:
Something like that
Or, if you like:
Ps: If there are too many layers, it’s really disgusting
Minor differences: - console.group expands by default. - console.groupCollapsed collapses by defaultCopy the code
I mean, the nuggets ‘kitchen is a good one
that’s all