Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Arrays</h1>
<h2>The Array.of() Method</h2>
<p>Array.of() creates a new array from any number of arguments:</p>
<p id="demo"></p>
<script>
let fruits = Array.of("Banana", "Orange", "Apple", "Mango");
document.getElementById("demo").innerHTML = fruits;
</script>
</body>
</html>