<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let str = 'hello world'
console.log(str.startsWith('e'))
console.log(str.endsWith('d'))
console.log(str.includes('e'))
console.log(str.includes("lo"))
let ss = `<div><span>hello world<span> </div> `
console.log(ss)
let name = "张三";
let age = 18;
let info = `我是${name},今年${age}了`;
console.log(info)
function fun() {
return "这是一个函数"
}
let s1 = `字符串模板 调用函数 ${fun()}`
console.log(s1)
</script>
</body>
</html>