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