functions.js 1.2 KB

123456789101112131415161718192021222324252627
  1. // ДЗ: Функции и области видимости
  2. // a---------------------------------------------------------------------------------------------------------;
  3. function a() {
  4. alert();
  5. }
  6. a("Hello");
  7. // cube------------------------------------------------------------------------------------------------------;
  8. function cube(a) {}
  9. // avg2------------------------------------------------------------------------------------------------------;
  10. function avg2(a, b) {
  11. return (a + b) / 2;
  12. }
  13. avg2(1, 2);
  14. avg2(10, 5);
  15. // sum3------------------------------------------------------------------------------------------------------;
  16. // intRandom-------------------------------------------------------------------------------------------------;
  17. // greetAll--------------------------------------------------------------------------------------------------;
  18. // sum-------------------------------------------------------------------------------------------------------;
  19. // Union-----------------------------------------------------------------------------------------------------;
  20. // Union declarative-----------------------------------------------------------------------------------------;