-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmixins.js
More file actions
39 lines (33 loc) · 959 Bytes
/
mixins.js
File metadata and controls
39 lines (33 loc) · 959 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
37
38
39
function User() {}
User.prototype = {
name: 'string',
addressstring: 'string',
city: '',
state: 'string',
zipcode: 'string',
avatar: 'imageURL',
getProfileUpdate: function(a, b, c, d, e, f) {
this.name = a;
this.addressstring = b;
this.city = c;
this.state = d;
this.zipcode = e;
this.avatar = f;
}
}
var userProfile = new User();
// var updateProfile = Object.assign({}, userProfile, {
// name: 'Jimmy',
// addressstring: '300 Hawthorne Lane',
// city: 'Charlotte',
// state: 'NC',
// zipcode: '28204',
// avatar: 'http://placehold.it/200x200',
// });
// console.log(updateProfile);
// console.log(userProfile.getProfileUpdate('Mary', '300 Hawthorne Lane', 'Charlotte', 'NC', '28204', 'http://placehold.it/200x200'));
function updateProfile() {
userProfile.getProfileUpdate('Jimmy', '300 Hawthorne Lane', 'Charlotte', 'NC', '28204', 'http://placehold.it/200x200')
console.log(userProfile);
}
updateProfile();