In javascript is there a good(i mean built in) way that i can find whether element if array of not ? one simple i can see is as follows but i don't like it
if(ele.push){//its array it has push method :) }
I mean i would like know if something like below if exists. typeof made me upset as its returning "object" (though that makes sense)
function x(ele){ if(isArray(ele)){//dosomething} }