Parcourir la source

02 fixes and additions

Ivan Asmer il y a 8 ans
Parent
commit
836878a23a
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      02OperationsTypesComparisonConditionLogic.md

+ 5 - 0
02OperationsTypesComparisonConditionLogic.md

@@ -423,6 +423,7 @@ switch (color){
 ```
 
 В примере выше "red" будет рисовать и "red" и "black", "blue" так же объединится с "green". Однако "black" и "green" будут работать так же как и ранее.
+**Замечание**: в силу особенностей реализации запуска кода со страницы, пара примеров выше не работают без копипасты в консоль.
 
 ## Логические операторы
 
@@ -525,9 +526,13 @@ var isYoung   = age > 16 && age < 30 // человек молод от 16 до 3
 0 && 1 && 2
 2 || 1 || 0
 2 && 1 && 0
+confirm('left') || confirm('right')
+confirm('left') && confirm('right')
 //null, undefined, so on
 null || 2
 undefined && 1
+alert("Hello") && confirm('Are you sexy?');
+alert("Hello") || confirm('Are you drunk?');
 //brackets and complex expressions
 (undefined || 2) && (2 || 0)
 (2 && 1) || (null && 0)