Advertisement
Morlom

Zadanie 5 - funkcje

Jan 25th, 2022
821
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     var x;
  3.     function LICZBA_CYFR(x) {
  4.         x = x.toString();
  5.         y = x.length;
  6.         return y;
  7.     }
  8.     x = 78234523;
  9.     document.write(x+ " zawiera " + LICZBA_CYFR(x)+ " cyfr<br>");
  10.     x = 2346;
  11.     document.write(x+ " zawiera " + LICZBA_CYFR(x)+ " cyfr<br>");
  12.     x = 237237;
  13.     document.write(x+ " zawiera " + LICZBA_CYFR(x)+ " cyfr<br>");
  14. </script>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement