• Prettier TS4.5

checkio coding js

Hello CheckiO users! 🙂

I'm glad to see you actively solving CheckiO puzzles. We have a couple of new puzzles for you, but let me share some fantastic news before that.

We are trying to keep TypeScript version as fresh as possible, so you can now use TS 4.5. Here you can read more about what is new in the 4.5 version.

Function "Clean code using prettier" is now available in the editor submenu. You may want to use it before sharing your solution. Here you can read more about what the Prettier is and what's new in the version 2.5.

Challenge yourself with our missions

Birthday Party - Calculate the best date for birthday party

assert.deepStrictEqual(
    birthdayParty(new Date(2022, 0, 5)),
    new Date(2022, 0, 8)
);
assert.deepStrictEqual(
    birthdayParty(new Date(2022, 1, 21)),
    new Date(2022, 1, 26)
);
assert.deepStrictEqual(
    birthdayParty(new Date(2022, 2, 26)),
    new Date(2022, 2, 26)
);
assert.deepStrictEqual(
    birthdayParty(new Date(2022, 3, 17)),
    new Date(2022, 3, 17)
);

Shorter Set - Remove elements from set from both sides

assert.deepStrictEqual(
    removeMinMax(new Set([8, 9, 18, 7]), 1),
    new Set([8, 9])
);
assert.deepStrictEqual(removeMinMax(new Set([8, 9, 7]), 0), new Set([8, 9, 7]));
assert.deepStrictEqual(removeMinMax(new Set([8, 9, 7]), 2), new Set([]));
assert.deepStrictEqual(removeMinMax(new Set([1, 2, 7, 8, 9]), 2), new Set([7]));

💡 3 Highlights from the TypeScript world:

Etsy’s Journey to TypeScript - The story about company's migration to TypeScript

Announcing TypeScript 4.5 - The Awaited Type and Promise Improvements. Template String Types as Discriminants. Private Field Presence Checks. And so on.

Rust is the Future of JavaScript Infrastructure - Rust has a steep learning curve. It's a lower level of abstraction than what most web developers are used to.

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game