Person Object
It has all the stuff
var person = {
name: "Nolan Hightower",
age: 15,
classes: [
"Integrated Math 3a",
"Spanish 4",
"Digital Photography 2",
"AP World",
"AP CSP",
],
interests: ["Coding", "Running"],
pets: {
type: "dog",
name: "Stanley",
years: "0.44",
},
};
console.log(person);
person.interests.push("Sleepings");
console.log("Changed object: " + JSON.stringify(person.interests));
person.interests[2] = "NOT SLEEPING >:)";
console.log("Changed key: " + JSON.stringify(person.interests));
console.log(person.age / 7);
console.log(typeof person.name);
console.log(typeof person.age);
console.log(typeof person.pets);
{
name: 'Nolan Hightower',
age: 15,
classes: [
'Integrated Math 3a',
'Spanish 4',
'Digital Photography 2',
'AP World',
'AP CSP'
],
interests: [ 'Coding', 'Running' ],
pets: { type: 'dog', name: 'Stanley', years: '0.44' }
}
Changed object: ["Coding","Running","Sleepings"]
Changed key: ["Coding","Running","NOT SLEEPING >:)"]
2.142857142857143
string
number
object