Some Non-stringifiable to Empty String: returns empty string when any expression has no toString property.
toString
const value = sn2e`string: ${'foo'} number: ${42} boolean: ${true} null: ${null} undefined: ${undefined}`;// value === '' Copy
const value = sn2e`string: ${'foo'} number: ${42} boolean: ${true} null: ${null} undefined: ${undefined}`;// value === ''
The string literals.
Rest
The expressions.
The output string.
Some Non-stringifiable to Empty String: returns empty string when any expression has no
toString
property.Example