Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
analyn jane calado3,523 Points
clarify me please... what going on?
i can't get the correct answer.
var data = [1,2,3]; var assorted = ; var assorted = ; var assorted = ;
So the second array should have assortment of data types, a number, a stritrng and a boolean value like true or false.
var assorted = [ "Hi my name is", true, 13];
Trace's example should work fine for you.
The challenge wants you to create a second array called assorted and add 3 values to the array, 1 as a string, 1 and a number and 1 and a Boolean.
Where 'I am a string' is a string because it is wrapped in quotes, 1 is a number literal if it were wrapped in quotes it would be a string representation of a number. And the last value of false or true in Trace's example is a Boolean.
var data = [1, 2, 3]; var assorted = ['I am a string', 1, false];