js isempty code example Example: javascript isempty // check whether a string is empty var is_empty = !str.length;