DEV Community

Andrew ⚛️ & ☕
Andrew ⚛️ & ☕

Posted on

1

Coding range() function with plain JavaScript

Enjoy the video 😀🙏

Also written version https://losseff.xyz/shorts/0024-javascript/

Top comments (1)

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo • Edited

or like this

function range(startAt, endAt) {
  const size = endAt - startAt + 1
  return Array(size).fill(startAt).map((a, b) => a + b);
}

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay