Skip to content

JS30

30 Days of JavaScript Challenge

30 Days of JavaScript Challenge

30 Days of JavaScript Challenge – solving one problem a day and writing a blog post on the solution approach, this was more of a JS basics revision with hands-on than a typical problem-solving. 30 Days of JavaScript Solutions ✨ Good Luck

Calculator with Method Chaining - 2726

Calculator with Method Chaining – 2726

🔗LC2726 🟢 Easy 🧩 Pattern – Classes 📅 Day 30/30 Days of JavaScript Design a Calculator class. The class should provide the mathematical operations of addition, subtraction, multiplication, division, and exponentiation. It should also allow consecutive operations to be performed using method chaining. The Calculator class constructor should accept a number which serves as… Read More »Calculator with Method Chaining – 2726

Array Wrapper - 2695

Array Wrapper – 2695

🔗LC2695 🟢 Easy 🧩 Pattern – Classes and Arrays 📅 Day 29/30 Days of JavaScript Create a class ArrayWrapper that accepts an array of integers in its constructor. This class should have two features: Example Solution

Event Emitter - 2694

Event Emitter – 2694

🔗LC2694 🟡 Medium 🧩 Pattern – Classes and Arrays 📅 Day 28/30 Days of JavaScript Design an EventEmitter class. This interface is similar (but with some differences) to the one found in Node.js or the Event Target interface of the DOM. The EventEmitter should allow for subscribing to events and emitting… Read More »Event Emitter – 2694

Compact Object - 2705

Compact Object – 2705

🔗LC2705 🟡 Medium 🧩 Pattern – JSON, Arrays and Objects 📅 Day 27/30 Days of JavaScript Given an object or array obj, return a compact object. A compact object is the same as the original object, except with keys containing falsy values removed. This operation applies to the object and any nested… Read More »Compact Object – 2705

Flatten Deeply Nested Array – 2625

🔗LC2625 🟡 Medium 🧩 Pattern – JSON, Arrays and Objects 📅 Day 26/30 Days of JavaScript Given a multidimensional array arr and a depth n, return a flattened version of that array. A multidimensional array is a recursive data structure that contains integers or other multidimensional arrays. A flattened array is a version of that array with some or all of… Read More »Flatten Deeply Nested Array – 2625