Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish the following advanced JS challenges (solve them in your project JS) #6

Open
AndrewLester opened this issue Sep 14, 2023 · 0 comments

Comments

@AndrewLester
Copy link
Member

AndrewLester commented Sep 14, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant