I'm trying to show a string using console.log. I just want to show the string (not have it interpreted as a format string).
Example string: 'here are two percents: %%'
My attempts to print it (google-chrome Version 100.0.4896.127):
console.log('here are two percents: %%')
// wrong output: 'here are two percents: %'
console.log('%s', 'here are two percents: %%')
// wrong output: 'here are two percents: %'
console.log('%s', '%s', 'here are two percents: %%')
// wrong output: 'here are two percents: %'
console.log('', 'here are two percents: %%')
// wrong output: ' here are two percents: %%'
Note the undesired leading space, in the last attempt.
How can I get the desired output 'here are two percents: %%' ?
