JavaScript Challenge: What would be your solution to this challenge? 🥷🏻🧩

JavaScript Challenge: What would be your solution to this challenge? 🥷🏻🧩

Hey folks. how are you today?!

Today I saw a cool and interesting JavaScript challenge and thought I’d bring it to our community too!

Soo…

The Challenge 🕵️‍♂️

The expected result for the challenge will be something like below:

🎯 Expected Output:

{
CJS: This is the original Node.js module system, used since its first versions.
}

And also the base code is to start solving the challenge as below:

🎯 Base Code:

function getCorrectDescription(patternName) {
let patterns = {
ESM: This is a more modern modularization pattern, officially introduced in newer versions of Node.js.,
CJS: This is the original Node.js module system, used since its first versions.,
AMD: AAMD is a modularization standard associated with JavaScript development for the browser.,
};

return ?;
}

A little cool, right?!

When I saw this challenge I thought it was really cool and I needed to take some time to apply it and finish it.

And you, what would be your proposed solution?! Leave it in the comments, let’s share and see different ways of solving

See you 😄😁

Leave a Reply

Your email address will not be published. Required fields are marked *