I obviously got something terribly wrong here so I'll appreciate any good 'ol advice.How come that if I write
var x=''; var y="12345";(y.substring(0, 3) === "000"||"999") ? x=1: x=0;console.log (x, y.substring(0, 3));
The answer would be 1 "123"
instead of 0 "123"
?
Thanks y'all!