Pregunta de entrevista de Blibli

How do you set a variable in JS?

Respuesta de la entrevista

Anónimo

19 mar 2022

I answered in JS only one with var rrserved word.but i think this question is a text-book of 'JS interview questions' that wanted to know if i understand the newest ES way to do variable assignment,, so i rephrase the question with 'do you mean in ES6?' and the interviewer said 'yes'. So i mentioned about 'let' and 'const' way..and the next question is so predictable..guess what? 'what is the difference between them?'