3 ms·
It mentions the CSS-styling formatting specifier, but skips over the more mundane "printf-style" ones. const obj = {objection: 'overruled'}; console.log( 'co
by missblit 5y ago
It mentions the CSS-styling formatting specifier, but skips over the more mundane "printf-style" ones.
const obj = {objection: 'overruled'};
console.log(
'console.log is the #%d %s API ever written %f\% no arguing! %o %O !!!',
1, 'greatest', 100, obj, obj);
I've tried to keep my example compliant but it's still a very tiny loosy-goosy standard, for example at least in Firefox you can write %.0f to skip printing the fractional part of the float, but the standard doesn't mention this.