how to check if a varibale is a empty string in js code example Example: empty string in javascript var s; // undefined var s = ""; // "" s.length // 0