Post image
Light Mode
Dark Mode
JavaScript 2025: Tuples, Temporal, and Trends

Hello, checkiomates🐱‍👤!

In this edition, explore TypeScript’s evolving tuple capabilities, get ready for the long-awaited Temporal API in JavaScript, and stay ahead with the top technical trends shaping 2025. Plus, challenge yourself with a coding mission that tests how to determine if numbers are “close enough” in JavaScript.

💡TIP

On Easy difficulty, each of the few starting stations is dedicated to a distinct data type.
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

🏁MISSION

Close Enough by freeman_lex -

Except when the prime factors of a, b already co-operate, the iron hand of the Fundamental Theorem of Arithmetic dictates that the integer powers a**pa and b**pb can never be equal for any two positive integer exponents pa and pb. However, in the jovial spirit of “close enough for government work”, we define two such powers to “hit” if their difference abs(a**pa-b**pb) multiplied by the tolerance is at most equal to the smaller of those powers. (This definition intentionally avoids division to keep it both fast and accurate for arbitrarily large integers.) For example, tolerance=100 expects a**pa and b**pb to be within 1 %. For given positive integers a, b return the smallest positive integer exponents [pa, pb] that satisfy the tolerance requirement.

assert.deepStrictEqual(hittingPowers(2, 4, 100), [2, 1]);
assert.deepStrictEqual(hittingPowers(2, 7, 100), [73, 26]);
assert.deepStrictEqual(hittingPowers(3, 6, 100), [137, 84]);

📖ARTICLE

Computing with tuples in TypeScript -

JavaScript’s Arrays are so flexible that TypeScript provides two different kinds of types for handling them: Arrays and Tuples. In this blog post, we look at the latter – especially how to compute with tuples at the type level.

JavaScript Temporal is coming -

Implementations of the new JavaScript Temporal object are starting to be shipped in experimental releases of browsers. This is big news for web developers because working with dates and times in JavaScript will be hugely simplified and modernized. Applications that rely on scheduling, internationalization, or time-sensitive data will be able to use built-ins for efficient, precise and consistent dates, times, durations, and calendars. We're a long way away from stable, cross-browser support, and there may be changes as implementations develop, but we can already take a look at Temporal as it stands now, why it's exciting, and what problems it solves.

5 Technical JavaScript Trends You Need To Know About in 2025 -

JavaScript remains the foundation of modern web development — not because it’s convenient, but because it’s relentless. It’s the most adaptive, versatile language, shaping everything from enterprise-grade applications to cutting-edge browser innovations. What’s emerging now in JavaScript isn’t incremental progress; it’s a paradigm shift. We’re talking about serverless architectures that scale globally, state management that decouples complexity from growth, and integrations that bring JavaScript closer to the hardware — running faster and leaner than anyone thought possible.

👩‍💻CODE SHOT

How do you think, what the following code does?

function ?????????(number: number, B: number): Boolean {
    function conv(n: number, base: number): number[] {
        const result = [];
        while(n){
            result.push(n % base);
            n = Math.floor(n / base);
        }
        return result;
    }
    const d = conv(number, B);
    const r = d.slice().reverse();
    return d.every((e, i) => e == r[i]);
}

🙌 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: Feb. 4, 2025, 6:21 p.m.
0
16
User avatar
freeman_lex