SOURCE

// 模板字符串
// 在模板字符串中,空格、缩进、换行都会被保留
// 可在js中书写html代码
// 模板字符串完全支持“运算”式的表达式,可以在${}里完成一些计算

var name = 'css'   
var hobby = ['coding', 'writing']
var finalString = `my name is ${name}, I love ${hobby[0]} and ${hobby[1]}`
console.log(finalString)

// 存在性判定
const son = "haha";
const fa  = "haha kkkkk";
console.log(fa.includes(son));

// 字符串重复
const a = "hh";
console.log(a.repeat(3))

// 箭头函数没有自己的this,在自己作用域的上一层继承this,且箭头函数继承来的this指向永远不会改变
// 箭头函数没有prototype

// 数组解构
const [f,g,k] = [1,3,4]
console.log(f,g,k)
const [p,,q] = [1,3,4]
console.log(p,q)



console 命令行工具 X clear

                    
>
console