0

Combine task

Here you can see for Loop, and two functions. For Loop adds a number to the variable, Function I adds two numbers together, Function II makes 3 second delay. The idea is to create something that adds the number every 3 seconds and it is changed not written next to each other. <script type="text/javascript"> var i = 4; for (; i<=15;) { document.write(i); i++; } </script> <script> function myFunction(a, b){ return a + b; } var x = myFunction(8,1); document.write(x); </script> <script> function addNumber(){ alert("Hey"); } setInterval(addNumber, 3000); </script>

25th May 2019, 10:14 PM
Miki
1 Resposta
0
I use simple ststements, tell the broeser what to do step by step. Keep it simple keep it up.
28th May 2019, 9:27 PM
Miki