How to Check if a String is Empty in JavaScript | Simple Guide #javascriptfunctions

preview_player
Показать описание
In this video, we'll walk you through the easiest and most efficient ways to check if a string is empty in JavaScript.
Рекомендации по теме
Комментарии
Автор

Programming tip: if you want to do this, just return the result of the expression. Dont do if else. Its needless.

The body of the function can be simplified to
return s === "";

luxmundi