https://www.w3schools.com/js/tryit.asp?filename=tryjs_array_is ? Il isArray()metodo controlla se un oggetto ? una matrice. <!DOCTYPE html> <html> <body> <h2>JavaScript Array.isArray()</h2> <p>Click the button to check if "fruits" is an array.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var fruits = ["Banana", "Orange", "Apple", "Mango"]; var x = document.getElementById("demo"); x.innerHTML = Array.isArray(fruits); } </script> </body> </html> |