JAVASCRIPT PROGRAMMING
3.68K subscribers
504 photos
3 videos
48 files
103 links
Hello! I am @imabhi3030 and welcome to the Coding channel! Here we can learn all things related to coding and improve our skills. I am always present to help you. If you need any kind of assistance, just let me know! 😊
Download Telegram
⌨️ JavaScript: 5 Useful Regex
Join for question paper @NadanParinde
💻 Skills To Be A Front-end Web Developer
JavaScript Useful Tips
300+ Courses Msg ✅@Myhurthearts
Please open Telegram to view this post
VIEW IN TELEGRAM
Web Development
Java with DSA
C++ with DSA
Ai/Ml Complete
8 Web Project
FAANG aptitude
Placement Amplitude
Only in 5% of Actual Course price
Everything in one course msg
@Myhurthearts ✅
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
CHALLENGE


class Range {
constructor(start, end, step = 1) {
this.start = start;
this.end = end;
this.step = step;
}

[Symbol.iterator]() {
let current = this.start;
const { end, step } = this;
return {
next() {
if (current <= end) {
const value = current;
current += step;
return { value, done: false };
}
return { value: undefined, done: true };
}
};
}
}

const range = new Range(1, 10, 3);
const result = [...range].map(n => n ** 2);
console.log(result);