Sololearn: Learn to Code
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2
Read the reference about destructuring assignment https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment let a, b, c = 4, d = 8; [ a, b = 6 ] = [ 2 ]; <a> gets it value from right hand side array [ 2 ] <b> gets its value from default value that was specified in left hand side array. * Read the "Default value" section in the above link [ c, d ] = [ d, c ]; Value of <c> and <d> are swapped. * Read the "Swapping variables" section in the above link
15th Jan 2023, 9:10 AM
Ipang
0
No problem, it's a good query šŸ‘
15th Jan 2023, 10:10 AM
Ipang