Description
Finish the following advanced JS challenges (solve them in your project JS). Use console.log to make sure your output is correct.
Question 1
Print the elements in the following array without a for loop:
['This', 'is', 'Hack', '4', 'Impact']
Question 2
Print the even elements in the following array without a for loop:
['This', 'is', 'Hack', '4', 'Impact']
Question 3
Transform the following array into an array where each element is a number corresponding to the length of the element in the same position in the original array.
['This', 'is', 'Hack', '4', 'Impact']
Question 4
Transform the following array into into an array where each element is a string of the form '<p>NAME_HERE</p>' where NAME_HERE is replaced by the element in the same position in the original array's name.
[{ id: 0, name: "What's" }, { id: 1, name: 'in' }, { id: 2, name: 'a' }, { id: 3, name: 'name' }]
BONUS Question 5
Print the elements in the following Emoji without a for loop:
'👨👩👧👦'
Hint: to turn the emoji (string) into a list of characters, do Array.from(STRING_HERE)
Description
Finish the following advanced JS challenges (solve them in your project JS). Use
console.logto make sure your output is correct.Question 1
Print the elements in the following array without a for loop:
['This', 'is', 'Hack', '4', 'Impact']Question 2
Print the even elements in the following array without a for loop:
['This', 'is', 'Hack', '4', 'Impact']Question 3
Transform the following array into an array where each element is a number corresponding to the length of the element in the same position in the original array.
['This', 'is', 'Hack', '4', 'Impact']Question 4
Transform the following array into into an array where each element is a string of the form
'<p>NAME_HERE</p>'whereNAME_HEREis replaced by the element in the same position in the original array's name.[{ id: 0, name: "What's" }, { id: 1, name: 'in' }, { id: 2, name: 'a' }, { id: 3, name: 'name' }]BONUS Question 5
Print the elements in the following Emoji without a for loop:
'👨👩👧👦'Hint: to turn the emoji (string) into a list of characters, do
Array.from(STRING_HERE)