Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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 Resposta
+ 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)