Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPolo Moreno
11,782 Pointsas I add a boolean value in the array??
this challengue say this
Set the 'mixture' variable to an array with 3 string elements, 2 numbers and one boolean.
this is my answer
var mixture = ['a string', 'manchas', 'a sub array', 3, 9]
but i not added the boolean value, as I add a boolean value in the array, can you help my please
var mixture;
var guides;
3 Answers
Ben Spears
19,148 PointsA boolean value would be something like true, or false. To add it to the array, make sure you do not put quotes around it.
like this:
var mixture = ['a string', 'manchas', 'a sub array', 3, 9, true]
Grant G
19,934 PointsThere ar only two boolean values true
or false
, just add one of them to your array.
Like this:
var mixture = ['a string', 'manchas', 'a sub array', 3, 9, true]
jeremie singler
4,569 Pointshello ,
boolean can only be true or false
var mixture = ['a string', 'manchas', 'a sub array', 3, 9,true]
hope this will help