-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjects.js
More file actions
36 lines (27 loc) · 958 Bytes
/
objects.js
File metadata and controls
36 lines (27 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//add object keyword of my choice
const workObject = { name: "Victor", dept: "Computer/statistics", level: "300lvl", field: "fullstack web development", height: "tall", mycolor: "Blue", hobby: "Watching movies", footballclub: "Chelsea", age: "18-24", favmovie: "Avengers and others" };
console.log(workObject)
//delete atleast two
delete workObject.favmovie;
delete workObject.age;
console.log(workObject)
//add three
workObject.favactor = "Jackie chan"
workObject.LastName = "Ezenma"
workObject.favfootbalplayer = "Lionel messi"
console.log(workObject)
//print with length on the console
let work = {
name: "Victor",
dept: "Computer/statistics",
level: "300lvl",
field: "full stack web development",
height: "Tall",
mycolor: "blue",
footballclub: "Chelsea ",
hobby: "watching movies",
favactor: "Jackie chan",
LastName: "Ezenma",
favfootbalplayer: "Lionel messi"
}
console.log(Object.keys(work).length)