-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathapp.js
68 lines (45 loc) · 1.42 KB
/
app.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// STRINGS
// firstVariable = "hello world";
// firstVariable = 1;
// let secondVariable = firstVariable;
// secondVariable = "any string";
// console.log(firstVariable); //1
// const yourName = "Ariel";
// let hello = `Hello, my name is ${yourName}`
// console.log(hello);
//BOOLEANS
// const a = 4;
// const b = 53;
// const c = 57;
// const d = 16;
// const e = 'Kevin';
// console.log(a < b);
// console.log(c > d);
// console.log('Name' == 'Name');
//FOR THE NEXT TWO, USE ONLY && OR ||
// console.log(true || false);
// console.log(false && false && false && false && false || true);
// console.log(false === false)
// console.log(e == 'Kevin');
// console.log(a != b != c); // note: a < b < c is NOT CORRECT (and is not a valid JS expression, think about using other math operations)
// console.log(a == a || d); // note: the answer is a simple arithmetic equation, not something "weird" console.log(48 __ '48');
//the Farm
let animal = "cow";
const moo = (a) => {
return a.toLowerCase === "cow"? "mooooo" : "hey, that's not a cow"
}
console.log(moo(animal));
//Driver's Ed
//LOOPS
//The Basics
//Get Even
//Give Me 5
//Savings Account
//ARRAYS & CONTROL FLOW
//OBJECTS
// let longest = array.reduce( (firstEl, secondEl) => {
// //if the first el is greater than the second el return firstEl
// return firstEl.length > secondEl.length ? firstEl : secondEl;
// }
// );
// console.log(longest)