mirror of https://github.com/01-edu/public.git
Clement Denis
3 years ago
2 changed files with 20 additions and 0 deletions
@ -0,0 +1,10 @@
|
||||
[ |
||||
{ |
||||
"description": "Count up to 3", |
||||
"code": "const args = saveArguments(console, 'log')\n\n// Your code\n\nupTo(3)\nequal(\n args.flat().join('\\n'),\n `0\n1\n2\n3`,\n)" |
||||
}, |
||||
{ |
||||
"description": "Count up to 11", |
||||
"code": "const args = saveArguments(console, 'log')\n\n// Your code\n\nupTo(11)\nequal(\n args.flat().join('\\n'),\n `0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11`,\n)" |
||||
} |
||||
] |
@ -0,0 +1,10 @@
|
||||
## Count up to |
||||
|
||||
### Instructions |
||||
|
||||
Declare `upTo` function that takes an `end` number argument. |
||||
|
||||
You must log each number starting at `0` until you reach the `end` value |
||||
(included) |
||||
|
||||
> Example: `upTo(3)` would log: 0 1 2 3 |
Loading…
Reference in new issue