Easiest way to check if a variable is an array in Javascript
There are lots of way to check whether the var is array or not but the easiest way is using instanceof Array Example 1 : var myName=[“Vignesh”,”A”,”Sathiyanantham”]; if (myName instanceof Array) { alert(myName is Array!’); } else { alert(‘myName Not…