Weird backticks string behavior in ES6

后端 未结 0 1243
渐次进展
渐次进展 2021-01-22 19:39

Why the string parameter behaves differently depending on how it was defined?

function a(s) {
    console.log(...s)
}
a (`cde`)  //prints c d e
a (\'cde\')  //pri         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题