Starting from:
$35

$29

Assignment 1 Solution

Question 1 20 / 20 pts










Which of these uses ES6's async / await properly?
















function downloadUrls(urls) {




const results = urls.map(async (url) = { return await download(url) });




};















Question 2 20 / 20 pts










Which of these will evaluate the function multiply to 63?










function multiply(x, y = 2, z = 3) {




return x * y * z;




}













Question 3 20 / 20 pts










How do we set result to 17?

























Question 4 20 / 20 pts










Which of these makes the variable rest contain 2 parameters?




const baseObject = { a: 12, b: 17, c: -1, d: "apple" }







Question 5 20 / 20 pts










How do we make an object with at least the following values?




const result = {




 
12,




 
17,




 
"panda"




}










const first = {




x: 12,




 
"batman"




};










const second = {




f: 16,













z: "panda"




}










const third = {




 
17,




 
"zubat"




}






More products