1.

Create A New Javascript Object With The Keys Of “fname” Equal To Your First Name, “lname” Equal To Your Last Name, And “fcolors” Equal To And Array Of 3 Of Your Favorite Colors. Assign This Object To A Variable Called “me” And Log It To The Console.

Answer»

VAR me = {"FNAME": "Riley", "LNAME": "Hilliard", "fcolors":["blue", "green", "whitesmoke"]};
console.log(me);
// or
var me = {};
me.fname = "Riley";
me.lname = "Hilliard";
me.fcolors = ["blue", "green", "whitesmoke"];
console.log(me);

var me = {"fname": "Riley", "lname": "Hilliard", "fcolors":["blue", "green", "whitesmoke"]};
console.log(me);
// or
var me = {};
me.fname = "Riley";
me.lname = "Hilliard";
me.fcolors = ["blue", "green", "whitesmoke"];
console.log(me);



Discussion

No Comment Found