j.IsNullOrEmpty

PHOTO EMBED

Wed Sep 22 2021 01:19:45 GMT+0000 (UTC)

Saved by @rick_m #javascript

function isNullOrEmpty(value){
    return (!value || value.length == 0);
}
content_copyCOPY

var objs = [1,null,"",[],false]; for(var i = 0; i<objs.length; i++){ console.log(i); console.log(objs[i]); console.log(IsNullOrEmpty(objs[i])); }