300+ Courses Msg ✅ @Myhurthearts
Please open Telegram to view this post
VIEW IN TELEGRAM
Web DevelopmentOnly in 5% of Actual Course price
Java with DSA
C++ with DSA
Ai/Ml Complete
8 Web Project
FAANG aptitude
Placement Amplitude
Everything in one course msg @Myhurthearts
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);
What is the output?
Anonymous Quiz
27%
[ 1, 9, 25, 49 ]
52%
[ 1, 16, 49, 100 ]
14%
[ 1, 9, 49 ]
7%
[ 1, 9, 25, 49, 81 ]