|
27 | 27 | </body>
|
28 | 28 | <script>
|
29 | 29 | // Statement 1: The elephant weighs less than the mouse
|
30 |
| - let eleWeight = 1000; |
31 |
| - let mouseWeight = 2; |
| 30 | + const eleWeight = 1000; |
| 31 | + const mouseWeight = 2; |
32 | 32 |
|
33 | 33 | // Statement 2: The Ostrich is taller than the duck
|
34 |
| - let ostrichHeight = 2; |
35 |
| - let duckHeight = 0.3; |
| 34 | + const ostrichHeight = 2; |
| 35 | + const duckHeight = 0.3; |
36 | 36 |
|
37 | 37 | // Statement 3: The two passwords match
|
38 |
| - let pwd1 = 'stromboli'; |
39 |
| - let pwd2 = 'stROmBoLi' |
| 38 | + const pwd1 = 'stromboli'; |
| 39 | + const pwd2 = 'stROmBoLi' |
40 | 40 |
|
41 | 41 | // Add your code here
|
42 | 42 |
|
43 | 43 | // Don't edit the code below here!
|
44 | 44 |
|
45 | 45 | const section = document.querySelector('section');
|
46 | 46 |
|
47 |
| - let para1 = document.createElement('p'); |
48 |
| - let para2 = document.createElement('p'); |
49 |
| - let para3 = document.createElement('p'); |
| 47 | + const para1 = document.createElement('p'); |
| 48 | + const para2 = document.createElement('p'); |
| 49 | + const para3 = document.createElement('p'); |
50 | 50 |
|
51 |
| - let weightTest = weightComparison ? 'True — elephants do weigh less than mice!?' : 'False — of course an elephant is heavier than a mouse!'; |
52 |
| - let heightTest = heightComparison ? 'True — an ostrich is indeed taller than a duck!' : 'False — apparently a duck is taller than an ostrich!?'; |
53 |
| - let pwdTest = pwdMatch ? 'True — the passwords match.' : 'False — the passwords do not match; please check them'; |
| 51 | + const weightTest = weightComparison ? 'True — elephants do weigh less than mice!?' : 'False — of course an elephant is heavier than a mouse!'; |
| 52 | + const heightTest = heightComparison ? 'True — an ostrich is indeed taller than a duck!' : 'False — apparently a duck is taller than an ostrich!?'; |
| 53 | + const pwdTest = pwdMatch ? 'True — the passwords match.' : 'False — the passwords do not match; please check them'; |
54 | 54 |
|
55 | 55 | para1.textContent = weightTest;
|
56 | 56 | section.appendChild(para1);
|
|
0 commit comments