forked from twilio/starter-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
construction.js
28 lines (24 loc) · 1.21 KB
/
construction.js
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
function construct(objectName) {
let newObject = {
name: objectName,
material: 'human',
assemble: true,
duration: 1000
}
return newObject;
}
let returnedObject1 = construct('fred');
console.log("The constructed object is: " + returnedObject1.name + " " +
returnedObject1.material + " " +
returnedObject1.assemble + " " +
returnedObject1.duration);
let returnedObject2 = construct('barney');
console.log("The constructed object is: " + returnedObject2.name + " " +
returnedObject2.material + " " +
returnedObject2.assemble + " " +
returnedObject2.duration);
let returnedObject3 = construct('wilma');
console.log("The constructed object is: " + returnedObject3.name + " " +
returnedObject3.material + " " +
returnedObject3.assemble + " " +
returnedObject3.duration);