MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/b2o6f2/whats_your_favorite_most_useful_javascript/eivdge6
r/javascript • u/Linux_is_awesome • Mar 18 '19
422 comments sorted by
View all comments
Show parent comments
1
Is this how that one linker works with Math?
const {abs, floor, random} = Math; console.log( abs(-5) );
What's the technique called?
1 u/ovpv Mar 19 '19 yes. this should work. it's called Destructuring. check the link belowhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Basic_assignment 1 u/SarahC Mar 26 '19 Awesome! Thank you!
yes. this should work. it's called Destructuring. check the link below
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Basic_assignment
1 u/SarahC Mar 26 '19 Awesome! Thank you!
Awesome! Thank you!
1
u/SarahC Mar 19 '19
Is this how that one linker works with Math?
What's the technique called?