isArray() in javascript - How to check is array or not
The Array.isArray() method returns true if an object is an array, false if it is not. It will check the specified value is array or not, if it is array return true value and if not return false.
Syntax
Example Program:- (Editor)
Editor is Loading...
Advertisement
Syntax
Array.isArray(variable or value);
Example
var ar=[10,20,30];
alert(Array.isArray(ar));
Example Program:- (Editor)
Editor is Loading...
Advertisement
Nhận xét
Đăng nhận xét