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.
david RamirezCourses Plus Student 2,797 Points
i dont understand the question
array string with a value string , a number value, and a boolean
var data = [1 ,2 ,3] var asssorted [ i , 4 , 0 < i];
var assorted = [ i, 4, 0 < i ]
You're on the right track but lets break it down further to what you thought were valid values.
The question is asking for an array with a String, Number, Boolean values respectively
String: you put
i for string was incorrect because
"i" with quotes makes it a string. Usually beginners have trouble with this. But you were on the right track.
4 was correct datatype. Nice!
0 < i there are two right answers to this
I thought this was a cool way how you answer with a Boolean Expression and I tested it and it actually passes in the interpreter but what actually gets stored is the Boolean value it equates to, either true or false not the Expression.
var data = [1, 2, 3,] var assorted = ["one", 2, true]