Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
While doing destructring in JavaScript, varable should be same as property name of an object?
Please See the code here. https://code.sololearn.com/W85bxXmy98HU/?ref=app
1 ответ
+ 1
It's not mentioned explicitly here in ES6 section of JS course but it seems so.
BTW, if you want to use another variable, you can do something like
let {h:a, s:b} = obj;
console.log(a)
console.log(b)