NOTE how for Objects we use const {} and for arrays const []
Objects
const {}
const []
const doggie = { first: 'Buzz', breed: 'Great Pyrenees', fur_color: 'black and white', activity_level: 'sloth-like', favorite_food: 'hot_dogs' }; const { first, breed } = doggie;
and with arrays:
const dogs = ['Great Pyrenees', 'Pug', 'Bull Mastiff'] const [medium, small, giant] = dogs console.log(medium, small, giant) // Great Pyrenees, Pug, Bull Mastiff const [, small, giant] = dogs console.log(small, giant) // Pug, Bull Mastiff
There was an error while loading. Please reload this page.
Summary
List (cmd)
Examples
Front End
Manipulating The DOM Events Communicating w/ Server
Arrays Scope Hoisting Objects Iteration Functions Collection Methods OO Programming - Class Promises Others
Endpoints Basic API