Challenge Hints: Accessing Elements Arrays

A list of hints for the challenges in the Accessing Elements Arrays lesson.

Last updated - June 30, 2023

 

Checkpoint

Did you use a variable name and brackets [] with a semicolon at the end?

Items in an array need to be separated by commas. Did you remember the semicolon at the end?

Try using alert() or console.log() to show the item at position 5

Synonyms and Antonyms

Did you copy and paste the array to declare it?

Did you properly log all the synonyms for HELP to the console? There should be 3

Did you properly log all the antonyms for HELP to the console? There should be 3

Alphabetize

Did you copy and paste the array to declare it?

Did you access the first name from the array and log it to the console?

Did you access the second name from the array and log it to the console?

Did you access the third name from the array and log it to the console?

Did you access the fourth name from the array and log it to the console 

Did you access the last name from the name array and log it to the console?

Mirrored Arrays

Did you declare an array with at least 5 elements?

Did you print out the array to the console in the correct order?

Did you print out the array to the console in reverse order?

Family Take-Out

Did you declare your 3 arrays with your 3 elements?

Did you compute the total cost of each item?

Did you log a statement about each item to the console?

Sums and Differences

Did you prompt the user asking it they would like to compute the sum or the difference?

Did you declare an array with at least 4 different elements?

Did you check to see if the user wanted to compute the sum?

Did you compute the difference otherwise and alert them of it?

For more help with JavaScript, check out our JavaScript Reference Guide!