Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <body> <p id="element"></p> <script> var myArray = ['a', 'b', 'c', 'd']; myArray.splice(2, 1); document.getElementById("element").innerHTML = myArray; </script> </body> </html>