Took 1 minute and 26 seconds to make this JavaScript push() method. Here is the code snippet.
Code:
arr = [1, 2, 3]
function push(arr, val) {
arr[arr.length] = val;
}
push(arr, 4);
document.write(arr);
1,2,3,4
10xCoderKids is your partner in the journey to become 10x Coder !!!
Good morning, everyone. I'm Saion Gupta, the Founder of 10xCoderKids and the Guinness World Record holder for the youngest computer prog...
No comments:
Post a Comment