Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
javascript
advanced
variables
23var_empty_string.js
23var_empty_string.js
/** * defining empty string */ name = ''; //empty string var type=typeof name; console.log(type +': '+ name); //string: if(name==null) console.log('Name is null'); //dont work else if(name=='') console.log('Name is empty string'); //works
Reload page
Preview
W3C validation
Edit Code
JS Console