-
Please use the map functionality to loop the list of booleans and create a new list that contains the string
'wiki'
for every1
and'woko'
for every0
that the original list had. -
Print that list on the console.
-
You need to map the entire list.
-
Inside your mapping function you need to use a conditional to verify if the current value is
0
or1
. -
If the current value is
1
you print the string'wiki'
. -
If the current value is
0
you print the string'woko'
.
[ 'woko', 'wiki', 'woko', 'woko', 'wiki', 'wiki', 'wiki', 'woko', 'woko', 'wiki', 'woko', 'wiki', 'wiki', 'woko', 'woko', 'woko', 'woko', 'woko', 'woko', 'woko', 'woko', 'wiki', 'woko', 'woko', 'woko', 'woko', 'wiki' ]