Browse Source

2commit all

Viktor97 1 year ago
parent
commit
4c379b374c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      HW2part2.js

+ 2 - 2
HW2part2.js

@@ -26,7 +26,7 @@ switch (color){
 
 let color1 = prompt("Введите цвет", "");
 if (color1 === "red") {
-    document.write("<div style='background-color: red;'>RED</div>");
+    document.write("<div style='background-color: red;'>RED</div> <div style='background-color: black; color: white;'>BLACK</div>");
 }
 else if (color1 === "black") {
     document.write("<div style='background-color: black; color: white;'>BLACK</div>");
@@ -57,7 +57,7 @@ let rob = confirm("Шопинг?") ? alert("GO") : alert("Ты бяка");
 
 //confirm: if this days
 let question = confirm("На шопинг ?")   
-if (question === true) {
+if (question) {
     alert("GO") 
 } else {
     alert("Сиди дома")