-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathappLogic.js
More file actions
66 lines (53 loc) · 2.37 KB
/
appLogic.js
File metadata and controls
66 lines (53 loc) · 2.37 KB
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
"use strict";
// OBJECTIVE ////////////////////////////////////////////////////////////////////////////////////////////////
// 1. Document clever uses of logic in javascript code
// SUMMARY //////////////////////////////////////////////////////////////////////////////////////////////////
// What is the problem?:
// 1. Unfortunatley, there are very few resources on efficient and concise logical structure.
// What is the BEST solution?
// 1.
// What are the special components of these solutions?:
// 1.
// What needs work?
// 1.
// Resource links
// https://medium.freecodecamp.org/a-definitive-guide-to-conditional-logic-in-javascript-23fa234d2ca3
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ABOUT LOGICAL OPERATORS...
// 1. There are three essential logical operators: &&, ||, and !.
//
// && -- "and" evaluates as true if both values are true.
// for example:
// const foo = true
// const bar = false
// const ree = true
//
// foo && bar; // false
// foo && ree; // true
//
// || -- "or" evaluates as true if one of the values evaluates as true.
// for example:
// const foo = true
// const bar = false
// const ree = true
//
// foo || bar // true
// foo || ree // false
//
// ! -- "exclamation" negates a boolean value.
// for example:
// const foo = true
//
// foo; // true
// !foo; // false
//
// Notes on Logical operators and
//
// ABOUT TRUTH TABLES...
// A B !A A && B A || B A -> B A === B
// ------------------------------------------------------------------------
// T T F T T T T
// T F F F T F F
// F T T T T T F
// F F T F F T T
//