js表示字符的“三”种方式
写码的都知道的,js 中常用的两种表示字符类型的方式无非就是 " 和 '
今天小编无意中发现了另外一种符号 · (就是 tab 键上面的那个键,和非运算符一个键,MySQL 中关键字用这个字符括起来)
【wxjs】
let str =`hello world`; console.log(str); //hello word console.log(typeof str); //string
大家都知道,微信小程序的 js 其实和 JavaScript 太大差别,语法和 JavaScript 也基本上一样。
所以我在 js 中也试验了一番,没有问题,如下代码:
【JavaScript】
var str = `hello`; console.log(str); //hello console.log(typeof str); //string
望大神多多给出意见!!