2808 explained code solutions for 75 technologies


javascriptCheck if a string is blank


var is_blank = str.trim().length === 0;ctrl + c
is_blank

will contain true if the str string is blank

str.trim()

trims whitespaces around the string

.length === 0

returns true if remaining string is empty