Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
for (var i=10; i>=0; --i) print(i);
|
||||
|
|
@ -0,0 +1 @@
|
|||
for (var i = 11; i--;) console.log(i);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
var i = 11;
|
||||
while (i--) console.log(i);
|
||||
13
Task/Loops-Downward-for/JavaScript/loops-downward-for-4.js
Normal file
13
Task/Loops-Downward-for/JavaScript/loops-downward-for-4.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function range(m, n) {
|
||||
return Array.apply(null, Array(n - m + 1)).map(
|
||||
function (x, i) {
|
||||
return m + i;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
range(0, 10).reverse().forEach(
|
||||
function (x) {
|
||||
console.log(x);
|
||||
}
|
||||
);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
console.log(
|
||||
range(0, 10).reverse().map(
|
||||
function (x) {
|
||||
return x;
|
||||
}
|
||||
).join('\n')
|
||||
);
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
console.log(
|
||||
range(0, 10).reverse().join('\n')
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue