-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmain.js
29 lines (28 loc) · 1.01 KB
/
main.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
29
/**
* @TODO implement the submitButton onclick event handler
* which onclick should:
* - get the form data from #form-container
* - create an object containing form data
* - create a method called debug for this object
* which alerts form data using a template string
* for debugging purposes
* - create and appends a User HTML element
* to #user-container
*/
/**
* @TODO create a User class which has username, email,
* and pfpURL props containing the appropriate data. the
* constructor of this class should assign data appropriately.
* if pfpURL is an empty string, we should assign it a value
* of "images/default-pfp.jpg"
*
* @TODO create a makeHTML method for the User class
* which will return an HTML element representing the
* User.
*
* this HTML element should be a div with the class "user-item".
*
* this div should have two children:
* - an img with the src set to this object's pfpURL
* - an h2 with the text set to this object's username
*/