OneCompiler

[Javascript] How to check if a string is empty?

I want to check if a string is empty, How can I check that in Javascript?

1 Answer

4 years ago by

if(!string) returns true if string is either empty or null.

4 years ago by Meera