Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Create a function that creates an array with the numbers 0 to X. You cannot use a loop, you cannot create multiple functions and the function must only contain one line.
- // Example:
- // When X is 10 the following array should be returned: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- // When X is 3 the following array should be returned: [0, 1, 2]
- // When X is 23 the following array should be returned [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement