Exercise 14/17


This statement lets me complete the exercise but it seems like the syntax for the object shouldn't let me. When I add the var before time it gives me an unexpected token error. Can anyone explain to me why.


To say the truth: I have no idea how you had to do it like that. This is what I did:

var myArray = [12, true, "HIHIHI", Object]


Create the object outside of the array. such as this:

var Object = {

something: 'string',
you_must_use_underscores_instead_of_spaces: 'but here it is fine'


and then call it in the array:

Array = [something,something,something,Object];


Yes type your object before then add your array after////

var myObject ={
name: "Christopher",
age: 17
var myArray = [21, true, "Chris", myObject];


Odd! This worked for me:

var bool = true;
var object = new Object();
    object.name = ("Celeste");
    object.job = ("Hustla'");
var Lakota = ("Best Tribe");
var myArray = [ 4, bool, Lakota, object];


Wow very complex. :open_mouth:


i like how to the point yours is! I will need to keep that in mind. I hadn't realized I could call 'Object' without defining it until just recently....ugh -_-


var pokemon = {fire: "charmander", water: "squirtle"}
var myArray = [1, false, "Hisyam", [pokemon] ];

heres a good website to go to it's called

http://codedanswersjs.blogspot.com/ :grinning: here u go it helped me with all the ones that i never were able to solve


Thanks to all of you. I ran it through my browser and apparently it also a legitimate way to create an object. JS assumes it is an object because of the way it is formatted. Kind of cool.


good to hear as it's how I did mine too.