split javascript
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Strings</h1>
<h2>The split() Method</h2>
<p>split() splits a string into an array of substrings, and returns the array.</p>
<p>The second word is:</p>
<p id="demo"></p>
<script>
let text = "How are you doing today?";
const myArray = text.split(" ");
document.getElementById("demo").innerHTML = myArray[1];
</script>
</body>
</html>
From : https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_split1
======
split javascript
Reviewed by Leo
on
Maret 16, 2022
Rating:
Tidak ada komentar