Use an Array to Store a Collection of Data`

Tell us what’s happening:
I can’t understandwhat should I do please can you help me?

Your code so far


let yourArray; // change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data

You just need to assign an array to that let yourArray variable. And your array must have at least 5 elements. At least one element must be a string, one must be a number and one must be a boolean(true or false). Other two elements can be anything of your choice.

can you explain what is boolean?

It’s a data type like string or number. And it has only two possible values --> true or false

Which is boolean’s code?

true or false… take a look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures

let yourArray;
var foo = true; // change this line

I should write that but how?

let yourArray = ['some string', 21, true, 'another string', 'one more string'];

something like that…

1 Like

Oh yes this is right I understand now thank you very much.

1 Like