Heterogenous Arrays


#1

Hi,
var myArray=[45,false,"dj",55];
What is wrong in this code.

`


#2

Hi @jyotishkaaich,

I don't believe there is anything wrong with your code. Could you please provide the link to the lesson you are working on?


#3

it is lesson 14 of objects and arrays in js.

minasf https://discuss.codecademy.com/u/minasf
May 9

Hi @jyotishkaaich https://discuss.codecademy.com/u/jyotishkaaich,

I don't believe there is anything wrong with your code. Could you please
provide the link to the lesson you are working on?


Visit Topic https://discuss.codecademy.com/t/heterogenous-arrays/84356/2
or reply to this email to respond.

To unsubscribe from these emails, click here
https://discuss.codecademy.com/email/unsubscribe/1752ce985ddab1023fd99c6ecd74d4169afb6da50ecc295aae70ffffa4ebc615
.


#4

Will you tell me how to do this?


#5

Hi,
var myArray=[45,false,"dj",me];
var me= new Object();
me.name="asdf";

Will you tell what is wrong in this code?


#6

Hi @jyotishkaaich,

This is not how they want you to declare the object. You have to declare an object like this:

var myObjExample = {
    someCharacteristic: 'description',
    anotherCharacteristic: 'description',
};

So you might want to do

var myArray = [45, false, "dj", me];
var meObj /*you must put "Obj"*/ = {
      something: 'something else',
}

. . . as a minimum. :wink:


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.