Tuesday, 29 October 2019

Javascript variable assignment

var a = {roles : 'test'}
undefined

const { roles } = a;
undefined
roles
"test"

roles gets the value test

No comments:

Post a comment