the default value of a variable declare with let in javascript is undefine code example
Example: javascript set variable if not defined
var x = (typeof x === 'undefined') ? your_default_value : x;
var x = (typeof x === 'undefined') ? your_default_value : x;