Post image
Light Mode
Dark Mode
JavaScript Unfolded: TypeScript Insights & Web Trends

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

A 10x Faster TypeScript -

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! —

Created: March 18, 2025, 5:21 p.m.
0
16
User avatar
freeman_lex