Passionate about the AI ecosystem. I love building AI tools that make developers more productive. Writing about software engineering, AI, and the things that keep bugging me at debuggr.io
Passionate about the AI ecosystem. I love building AI tools that make developers more productive. Writing about software engineering, AI, and the things that keep bugging me at debuggr.io
Passionate about the AI ecosystem. I love building AI tools that make developers more productive. Writing about software engineering, AI, and the things that keep bugging me at debuggr.io
JavaScript:
I think you have an off-by-one error:
spreadNumber(2)gives[0, 1]instead of[1, 2]. Nice and concise, though!Thanks. I didnt notice its zero based
That creates an Array from 0 to n not from 1 to n ;-)
const spreadNumber = n => Array(n).fill(0).map((_, i) => i+1);Yeah, i didnt notice its not zero based
Another way: