Skip to content

Instantly share code, notes, and snippets.

Avatar
😭
Sad and Brazilian

Ana Luiza Portello Bastos anabastos

😭
Sad and Brazilian
View GitHub Profile
View show-me.js
/**
* Show Me the Evens - Show me the Odds
* Diana is learning to count and she just learned the difference between odds and even numbers.
* She wants to have some fun, so she picks a random number.
* If that number is even, she decides to count all the even numbers up to it starting from 0 up to (but not including) the input.
* If not, she decides to count all the odd numbers up to that number starting from 1 (but not including) the input.
**/
const counting = (x) => {
return arrayFrom(x)