Fix misplaced anchor tag (#20346)
This commit is contained in:
committed by
Christopher McCormack
parent
09ed92cd45
commit
360e3fffbd
@ -19,11 +19,11 @@ You need to check if an element is an array or not.
|
||||
|
||||
##  Hint: 2
|
||||
|
||||
If you are dealing with an array, then you need flatten it by getting the value inside of the array. This means if you have <a href='https://forum.freecodecamp.com/images/emoji/emoji_one/speech_balloon.png?v=3 ":speech_balloon:"' target='_blank' rel='nofollow'>[4]] then instead of returning [4] you need to return 4\. If you get [[[4]]] then the same, you want the 4\. You can access it with arr[index1][index2] to go a level deeper.
|
||||
If you are dealing with an array, then you need flatten it by getting the value inside of the array. This means if you have `[[4]]` then instead of returning `[4]` you need to return `4`. If you get `[[[4]]]` then the same, you want the `4`. You can access it with `arr[index1][index2]` to go a level deeper.
|
||||
|
||||
> _try to solve the problem now_
|
||||
|
||||
##  Hint: 3
|
||||
|
||||
You will definitely need recursion or another way to go beyond two level arrays to make the code flexible and not hard-coded to the answers needed. Have fun!
|
||||
|
||||
@ -31,7 +31,7 @@ You will definitely need recursion or another way to go beyond two level arrays
|
||||
|
||||
## Spoiler Alert!
|
||||
|
||||

|
||||

|
||||
|
||||
**Solution ahead!**
|
||||
|
||||
|
Reference in New Issue
Block a user