JSFiddle - React, Tailwind, and code Playground

by danShumway

JavaScript

var myArray = new Array(); //Let's make an array
var myNumber = new Number(5); //Let's make a number

//Call the push method from array, and pass it in the number as "this"
alert("The number of elements in the number 5 is : " + myArray.push.call(myNumber, "My data")); //Result - 1 new element

//Call the pop method from the array, and pass it in the number as "this"
alert("I popped an elment of the number 5 and got : " + myArray.pop.call(myNumber));