Last active
April 30, 2020 16:32
-
-
Save Roner1k/bb7838959f06d01fa0b123041b2b56d5 to your computer and use it in GitHub Desktop.
rec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let n = 10; | |
| function count(n) { | |
| // for(let i = 1; i <= n; i++){ | |
| // console.log(`Ввожу число ${i}`) | |
| // }; | |
| if(n--){ | |
| console.log(`Выводим N: ${n}`) | |
| count(n); | |
| } | |
| }; | |
| let number = 10; | |
| function count(number) { | |
| if (!number) return 0; | |
| document.write(`${number}`); | |
| return count(number-1); | |
| } | |
| count(number); | |
| let number = 10; | |
| function count() | |
| { | |
| document.write(${number} ); | |
| number--; | |
| if(number==0) | |
| return 0; | |
| return count(); | |
| } | |
| count(); | |
| let beforeRange = prompt('введите : ', 10); | |
| function reversCount(){ | |
| console.log(beforeRange); | |
| beforeRange--; | |
| if(beforeRange==0)return 0; | |
| return reversCount(); | |
| }; | |
| reversCount(); | |
| let x = prompt('Введите число', 1234); | |
| let y = 0; | |
| for (y; x; x = Math.floor(x / 10)) { | |
| y *= 10; | |
| y += x % 10; | |
| } | |
| document.write(y); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment