symbols in template literals

Claude Pache claude.pache at gmail.com
Thu Sep 11 14:55:03 PDT 2014


Recently, `String(symbol)` has been modified in order to not throw, on the ground that it is an explicit conversion, and a safer one than `.toString()`. [1]

What about symbols in untagged templates?

    function foo(num, sym) {
        if (__debugMode)
            window.alert( `Got arguments: ${num} and ${sym}`)
        // ...
    }

—Claude

[1] http://esdiscuss.org/topic/string-symbol


More information about the es-discuss mailing list