Skip to content

Commit 29827b2

Browse files
committed
FixWithEslint
1 parent 9db03e4 commit 29827b2

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Javascript/2-logical-operators.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
'use strict';
22

3-
let tea = true;
4-
let juice = true;
3+
const tea = true;
4+
const juice = true;
55

6-
let vodka = false;
7-
let beer = false;
6+
const vodka = false;
7+
const beer = false;
88

9-
let goodDrinks = tea && juice; // true
10-
let badDrinks = vodka && beer; // false
11-
let badMix = vodka && juice; // false
9+
const goodDrinks = tea && juice; // true
10+
const badDrinks = vodka && beer; // false
11+
const badMix = vodka && juice; // false
1212

1313
console.log('...Logical operator AND (&&)...');
1414

1515
console.log('Mix of Tea AND Juice is ' + goodDrinks);
1616
console.log('Mix of Vodka AND Beer is ' + badDrinks);
1717
console.log('Mix of Vodka AND Juice is ' + badMix);
1818

19-
let engine_1 = true;
20-
let engine_2 = false;
19+
const engine1 = true;
20+
const engine2 = false;
2121

22-
let fly = engine_1 || engine_2; // true, because the plane needs at least one OK engine
22+
const fly = engine1 || engine2; // true, because the plane needs at least one OK engine
2323

2424
console.log('...Logical operator OR (||)...');
2525

26-
console.log('The first engine works? - ' + engine_1);
27-
console.log('The second engine works? - ' + engine_2);
28-
console.log('Is the plane still flying? - ' + fly );
26+
console.log('The first engine works? - ' + engine1);
27+
console.log('The second engine works? - ' + engine2);
28+
console.log('Is the plane still flying? - ' + fly);
2929

30-
let happy = true;
30+
const happy = true;
3131

32-
let mood = !happy; // false
32+
const mood = !happy; // false
3333

3434
console.log('...Logical operator NOT (!)...');
3535

36-
console.log('He is happy? - ' + mood);
36+
console.log('Is he happy? - ' + mood);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy