Marko 2 rokov pred
rodič
commit
56b1e9fdd1
1 zmenil súbory, kde vykonal 63 pridanie a 0 odobranie
  1. 63 0
      file.js

+ 63 - 0
file.js

@@ -59,3 +59,66 @@ function sum(){
    }
    sum()
 
+//    Union
+
+// function aSample(){
+//     a()
+// };
+
+// function cubeSample(){
+//     cube()
+// };
+
+// function avg2Sample(){
+//     avg2()
+// };
+
+// function sum3Sample(){
+//     sum3()
+// };
+
+// function randomSample(){
+//     intRandom()
+// };
+
+// function greetSample(){
+//     greetAll()
+// };
+
+// function sumSample(){
+//     sum()
+// };
+
+let sample = prompt('Введите задание');
+switch(sample.toLowerCase()){
+    case "a": a()
+         break
+    case "cube": cube(2)
+         break
+    case "avg2": avg2(3,4)
+         break
+    case "sum3": sum3(5,6,7)
+         break
+    case "intRandom": intRandom(8,12)
+         break
+    case "greetAll": greetAll("Oleg","Ivan")
+         break
+    case "sum": sum(9,10,11,13,14)
+         break
+}
+
+
+// Union declarative
+
+
+let samplee = {
+    "a": a(),
+    "cube": cube(2),
+    "avg2": avg2(3,4),
+    "sum3": sum3(5,6,7),
+    "intRandom": intRandom(8,12),
+    "greetAll": greetAll('Oleg','Ivan'),
+    "sum": sum(9,10,11,12,13)
+}
+
+