variable with an empty string javascript code example
Example 1: empty string in javascript
var s; // undefined
var s = ""; // ""
s.length // 0
Example 2: declare empty variable javascript
It's initialized to undefined by default, just use that, you don't have to write it out:
var obj;
If it you want to concatenate to a string, use '', for counters use 0... Just use common sense.