Skip to content

Commit 53e6f50

Browse files
authored
[MERGE/PR] Approve HW #_3
Approval HW-6.8 "boolean-logic", by Ivan. FS-dev: B-3 / JS basic
2 parents b89f77e + 4c5fe4a commit 53e6f50

File tree

1 file changed

+15
-0
lines changed
  • full-stack-dev/3-js-basic/6-boolean-logic/6-8-hw-3-can-drive

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Написать код (одной строкой), который позволяет проверить возможность вести машину по следующим параметрам:
2+
// hasLicence - имеет права
3+
// age - возраст
4+
// isDrunk - пьян
5+
6+
const hasLicence = true;
7+
const age = 21;
8+
const isDrunk = false;
9+
10+
const canDrive = hasLicence && age >= 18 && !isDrunk;
11+
console.log(
12+
`Данный человек может вести машину? ${
13+
canDrive ? 'Да, может!' : 'Нет.. не может!'
14+
}`
15+
); // Данный человек может вести машину? Да, может!

0 commit comments

Comments
 (0)