We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b89f77e + 4c5fe4a commit 53e6f50Copy full SHA for 53e6f50
full-stack-dev/3-js-basic/6-boolean-logic/6-8-hw-3-can-drive/index.js
@@ -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