<html>
<body>
<h1>JavaScript 字符串</h1>
<h2>includes() 方法</h2>
<p>如果字符串包含指定的字符串,includes() 方法将返回 true。</p>
<p>查找 "world":</p>
<p id="demo"></p>
<p>Internet Explorer 11(或更早版本)不支持 includes()。</p>
<script>
let text = "Hello world, welcome to the universe.";
let result = text.includes("world");
document.getElementById("demo").innerHTML = result;
</script>
</body>
</html>