forked from LaunchCodeEducation/javascript-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlecture1012
More file actions
44 lines (34 loc) · 892 Bytes
/
lecture1012
File metadata and controls
44 lines (34 loc) · 892 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
40
41
42
43
44
let friends = ["Whitney", "Ashley", "Tisha", "Crissy", "Trice"];
try {
console.log(friends[0].length);
}catch(e) {
console.log("She is not our friend");
}
console.log("No, seriously");
function checkNum(num) {
if (isNaN(num)) {
throw Error ("Buddy that is not a number")
}
return "Yup, that's a number";
}
//console.log(checkNum("Whitney"));
console.log(checkNum(100));
//let whitneyForgetAboutMe;
//types
//let babyGiraffe = {
//species: "A giraffe, idk what else to tell you",
// name: "Whitney",
// age: "baby",
// diet: "a lot of leaves",
// height: "one gerard",
// weight: null
//};
//Scope
//for( let i = 0; i <51; i++) {
//console.log(i);
//}
//var i = "no";
//console.log(`The final value of i is: ${i}`);
////unhoistedVariable = "Whitney"
//console.log(unhoistedVariable);
//var unhoistedVariable