|
|
|
|
|
by kamranjon
1304 days ago
|
|
Unfortunately eslint would likely flag this as unused vars, so typically you would not do this as you've described. Object destructuring is a bit more forgiving and can be a nice alternative: const {id, name} = loadUserInfo() - assuming you wrote loadUserInfo and are in control of the return value. |
|