in this i didn't defined now variable but when i run code in console it is working why?
var year, yearJohn, yearMark;
now = 2018
year = 2018;
yearJohn = year - 28;
yearMark = year - 33;
console.log(yearJohn, yearMark);
console.log(now + 2);
i expect the output of code will be syntax error, but the actual outpur is 2020.