isempty for array in javascript code example
Example: javascript is array empty
var colors=[];
if(!colors.length){
// I am empty
}else{
// I am not empty
}
var colors=[];
if(!colors.length){
// I am empty
}else{
// I am not empty
}