Checking for an empty string in JavaScript

Is there a built-in JavaScript function to check whether a string is empty?

Comments

  • You can check as follows. But it is not a built-in function.

    if(yourString === ""){
      // Code
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion