Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const robot = {
- model: 'SAL-1000',
- mobile: true,
- sentient: false,
- armor: 'Steel-plated',
- energyLevel: 75
- };
- // What is missing in the following method call? - add object in the parentheses
- const robotKeys = Object.keys(robot);
- console.log(robotKeys);
- // Declare robotEntries below this line: - to print all key and values of the object
- const robotEntries = Object.entries(robot);
- console.log(robotEntries);
- // Declare newRobot below this line: - first paramenter is what you want to add, the second is the source of the object
- const newRobot = Object.assign({laserBlaster: true, voiceRecognition: true}, robot);
- console.log(newRobot);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement