forked from devleague/js-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasics.js
More file actions
24 lines (19 loc) · 724 Bytes
/
basics.js
File metadata and controls
24 lines (19 loc) · 724 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
/* Create a `myName` variable and assign it a String value */
/* Create a `person` variable and give it 2 properties,
* `name`, assign it the same name as before,
* as well as an `age` (number);
*/
/* Create a variable called `canDrive`,
* if it should be true if your person object is at least 16 years old
*/
/* Create a function called `greet`,
* it should take a 1 parameter, `name`
* and it should print "Hello, my name is {name}"
*/
/* Create an array called `dataTypes` with atleast 1 of every data type;
* (there are 6 different data types);
*/
/* Create a `dog` object
* it should have a `bark` function that makes your dog bark!
* It should also have a name attribute with the value of 'Spot'
*/