My Blog List

Monday, July 8, 2013

splice in javascript

<!DOCTYPE html>
<p id="demo">Click the button to add elements to the array.</p>
<button onclick="myFunction()">Try it</button>
function myFunction()
var fruits = ["Banana", "Orange", "Apple", "Mango"];
var x=document.getElementById("demo");

any way splice meaning is remove 0(count) from 2 line and add Lemon, Kiwi in array

No comments:

Post a Comment