DEV Community

Discussion on: JavaScript: var, let, const

Collapse
 
helloanandpatel profile image
helloanandpatel

Ming-Shiuan Tsai, nice article. It looks like there is a mistake in your last javascript snippet. Shouldn't it be -
var x = 'foo';
var y;
console.log(x);
console.log(y);
y = 'late foo';
console.log(y);

Collapse
 
abdallah0123 profile image
abdallah0123 • Edited

I think your are right

Collapse
 
mingt profile image
Ming-Shiuan Tsai

Thanks for pointing out the mistake! I've updated the article!