判开头与结尾
let name = "天龙八部.mp4"
let b = name.endsWith(".mp4")
console.log(b)
let b2 = name.startsWith("天龙")
console.log(b2)
重复数据
让符号重复20次
let s = "*".repeat(20)
console.log(s)
微信扫一扫
let name = "天龙八部.mp4"
let b = name.endsWith(".mp4")
console.log(b)
let b2 = name.startsWith("天龙")
console.log(b2)
让符号重复20次
let s = "*".repeat(20)
console.log(s)
相关推荐