Hello, checkiomates🐱👤!
This week's digest explores the cutting edge of the ecosystem, featuring the official release of ECMAScript 2025 with new Set methods and iterator helpers. We also demystify JavaScript generators as a tool for cleaner async flows and identify the must-know features of 2025, from pattern matching to the Temporal API. Our mission challenges your mathematical logic to solve a quadratic equation and return its real roots.
💡TIP
We allow users to assign hotkeys to "Run Code", "Check Solution" and stop code. You may see current combinations on buttons and change them in editor menu. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
🏁MISSION
Quadratic Equation Roots by freeman_lex -
A quadratic equation is represented as ax2 + bx + c = 0. Your code must return Iterable containing two values: the roots x1, x2, sorted descending. If there's only one real root, both values will be the same. If there are no real roots, the Iterable should contain the string "No real roots".
assert.deepStrictEqual(quadraticRoots(1, 0, -1), [1, -1]); assert.deepStrictEqual(quadraticRoots(1, 2, 1), [-1, -1]); assert.deepStrictEqual(quadraticRoots(1, 0, 1), ["No real roots"]);
📖ARTICLES
Ecma International approves ECMAScript 2025: What’s new? -
Each year, the Ecma General Assembly approves the latest ECMAScript language specification, and you can read the ES2025 spec in full. Better, though, is to enjoy Dr. Axel’s succinct explainer.
I think the ergonomics of generators is growing on me -
If you've never worked with generator functions, this remains a great look at what they are and where they can be useful. Alex notes that “their practicality hasn’t exactly caught on” (yet..)
Some features that every JavaScript developer should know in 2025 -
A quick list post breezing through some more modern areas of JavaScript including iterator helpers, structuredClone(), and set operations.
👩💻CODE SHOT
What do you think the following code does?
function checkio(items){
let dig = items.filter(el=>el!==0).sort((a,b)=>a - b);
return items.map(el=>el!==0 ? dig.shift() : 0);
}
🙌 Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! ⤵