标签:tar highlight 方便 返回 es6 布尔 java break fas
let dessert = ‘cake‘, drink = ‘tea‘ let breakfast =`今天的早餐是 ${dessert} 与 ${drink} !`; console.log(breakfast.startsWith(‘今天‘)) //true console.log(breakfast.endsWith(‘!‘)) //true console.log(breakfast.includes(‘apple‘)) //false
console.log(breakfast.startsWith(‘今天‘,0)) //true console.log(breakfast.endsWith(‘!‘,19)) //true console.log(breakfast.includes(‘cake‘,5)) //true
标签:tar highlight 方便 返回 es6 布尔 java break fas
原文地址:https://www.cnblogs.com/fe-cherrydlh/p/11021086.html