
Hello, checkiomatesđ±âđ€!
This edition explores the forefront of JavaScript innovation, highlighting TypeScriptâs native porting achievements and a persuasive sales pitch that redefines its value, along with comprehensive trends from the 2024 JavaScript Almanac. Plus, engage with our "Flip of Time" missionâa creative challenge to test your skills.
đĄ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
Flip Of Time by freeman_lex -
An hourglass is given as a array [upper, lower] for the number of minutes of sand that are currently stored in its upper and lower chambers, both chambers large enough to hold all of the sand in that hourglass. So after m minutes of time has elapsed, the state of that particular hourglass will be upper - min(upper, m), lower + min(upper, m). The total amount of sand inside the hourglass never changes, nor will either chamber ever contain negative anti-sand. Given a list of glasses, your task is to find an optimal sequence of moves to measure exactly t minutes, scored as the number of individual hourglass flips performed along the way. Each move consists of two stages: you must first wait for the hourglass that currently holds the lowest non zero amount m of sand in its upper chamber to run out. when that happens, choose any subset of glasses and instantaneously flip this chosen subset.
assert.strictEqual(hourglassFlips([[1,0],[2,0]], 2), 0); assert.strictEqual(hourglassFlips([[7,0],[11,0]], 15), 2); assert.strictEqual(hourglassFlips([[4,0],[6,0]], 11), null);
đARTICLE
TypeScript has shaken up the JavaScript ecosystem in recent years with an increasing number of developers relying on its strong typing and added structure. TypeScriptâs compiler isnât particularly fast, though, but the TypeScript team at Microsoft are changing that by porting it to Go!
A Report on How the Web is Really Using JavaScript -
Each year, the HTTP Archive puts together the Web Almanac, a report on the âstate of the Webâ. The JavaScript section has just gone live and goes into depth on how much JS weâre using (or failing to use!), the popularity of TypeScript, loading methods, Web Worker use, and, yes, jQuery still leads the way!
My sales pitch for TypeScript -
As one of JavaScriptâs most esteemed writers, if Dr. Axel Rauschmayer canât convince you of the value of TypeScript, who could?
đ©âđ»CODE SHOT
How do you think, what the following code does?
function ????????(values: any[]): any[][] { return [values.splice(0, Math.ceil(values.length / 2)), values]; }
đ 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! —