JavaScript | 자바스크립트 | DATA STRUCTURES 넷
JavaScript | 자바스크립트 | DATA STRUCTURES 넷
Arrays and Objects in JS | Codecademy
In this course, we'll cover some of the more powerful features of JavaScript in greater detail. We'll review arrays, create arrays of arrays, and begin learning about a new data structures: objects.
Four. Review
File1 _ script.js
var bool1 = true;var myObj = {
type: 'fancy',
disposition: 'sunny'
};
var myArray = [35, bool1, "JONE", myObj];
15/17 Multidimensional arrays
File1 _ script.js
var myObj = {type: 'fancy',
disposition: 'sunny'
};
var newArray = [[3,5], [0,7,myObj], "JONE", myObj];
console.log(newArray);
16/17 Editing an existing object
File1 _ script.js
var myObject = {name: 'Eduardo',
type: 'Most excellent',
// Add your code here!
interests: [1,2,3,"JONE"]
};
console.log(myObject);
17/17 Creating your own objects
File1 _ script.js
var myOwnObject = new Object();myOwnObject.name = "JONE";
myOwnObject.style = [34,25,34];
myOwnObject.age = 35;
console.log(myOwnObject);
