GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaScript_docs/02.operators/9.logical.js at main · dev-language/JavaScript_docs

Expand file tree

/

9.logical.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
52 lines (45 loc) · 1.26 KB
/

9.logical.js

Copy path

File metadata and controls

52 lines (45 loc) · 1.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
// 논리 연산자 Logical operator
// ⭐️ && 그리고
// ⭐️ || 또는
// ⭐️ ! 부정(단항연산자)
// !! 불리언 값으로 변환
// '&&' num이 0보다 크거나 같고, 20보다 클때 실행
let num = 31;
if (num >= 0 && num > 20) {
console.log(`${num} 🤟`);
} else {
console.log(`조건에 맞지 않습니다.`);
} //31 🤟
// '||' num이 3보다 작거나, 20보다 클때 실행
num = 2;
if (num < 3 || num > 20) {
console.log(`${num} 🤟`);
} else {
console.log(`조건에 맞지 않습니다.`);
} //2 🤟
num = 10;
if (num < 3 || num > 20) {
console.log(`${num} 🤟`);
} else {
console.log(`조건에 맞지 않습니다.`);
} // 조건에 맞지 않습니다.
// '!' num이 10이 아니면 실행
num = 11;
if (num != 10) {
console.log(`${num} 🤟`);
} else {
console.log(`조건에 맞지 않습니다.`);
} // 11 🤟
console.clear();
console.log(true && true); //true
console.log(true && false); //false
console.log(false && true); //false
console.log(false && false); //false
console.clear();
console.log(true || true); //true
console.log(true || false); //true
console.log(false || true); //true
console.log(false || false); //false
console.clear();
console.log(!'text'); //false
console.log(!!'text'); //true
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.