What will be the output of the following code in ES5 compiler? Will it throw any error or will it work fine?
let foo = 123;
let {x,y} = getValues(); 6 2 Answers
Will not work. let was introduced in ES6.
It wouldn't work for an ES5 compiler. But using Babel will solve this issue by transpiling your ES6 code down to compatible versions.