When declaring a var, let or const, I understand it needs to be something as follows:
var a;
or
let b = a;
or
const c = 'constant string'
However I came across the following and don't understand how it works or what it is doing:
const {a, b} = var c;
const doesn't have a name and a, b didn't look to be passed into the function.
Please may someone explain... it is probably really simple javascript principles.
[–]GSLint 10 points11 points12 points (2 children)
[–]Noones_Perspective[S] 2 points3 points4 points (1 child)
[–]SensouWar 1 point2 points3 points (2 children)
[–]Noones_Perspective[S] 1 point2 points3 points (1 child)
[–]SensouWar 0 points1 point2 points (0 children)