9951 explained code solutions for 126 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