From 5c5e165e270770b5ad92977c959f65afff382da3 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Mon, 9 Mar 2026 20:29:04 +0000 Subject: [PATCH 01/15] fix: handle non-array and non-numeric inputs in calculateMedian --- Sprint-1/fix/median.js | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/Sprint-1/fix/median.js b/Sprint-1/fix/median.js index b22590bc6..c593f1811 100644 --- a/Sprint-1/fix/median.js +++ b/Sprint-1/fix/median.js @@ -6,9 +6,41 @@ // or 'list' has mixed values (the function is expected to sort only numbers). function calculateMedian(list) { - const middleIndex = Math.floor(list.length / 2); - const median = list.splice(middleIndex, 1)[0]; - return median; + let newArray = []; + if(!Array.isArray(list)) + { + return null; + } + + for (const item of list) + { + if (typeof item === 'number') + { + newArray.push(item); + } + + } + if (newArray.length === 0) + { + return null; + } + newArray = newArray.sort((a, b) => a-b); + if(newArray.length %2 === 0) + { + const rightIndex = newArray.length/2 + const leftIndex = rightIndex - 1; + const median = (newArray[rightIndex] + newArray[leftIndex])/2; + return median; + + } + else{ + + const middleIndex = Math.floor(newArray.length/2); + return newArray[middleIndex] + } + //const middleIndex = Math.floor(newArray.length / 2); + //const median = list.splice(middleIndex, 1)[0]; + //return newArray[middleIndex]; } module.exports = calculateMedian; From 4700cb12ac3bd3a4795eb6111ed93873366ac786 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Tue, 10 Mar 2026 18:45:13 +0000 Subject: [PATCH 02/15] Implement dedupe function --- Sprint-1/implement/dedupe.js | 18 +++++++++++++++++- Sprint-1/implement/dedupe.test.js | 13 ++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Sprint-1/implement/dedupe.js b/Sprint-1/implement/dedupe.js index 781e8718a..b19b591e3 100644 --- a/Sprint-1/implement/dedupe.js +++ b/Sprint-1/implement/dedupe.js @@ -1 +1,17 @@ -function dedupe() {} +function dedupe(list) { + if (list.length=== 0) + { + return []; + } + let result = []; + for (let item of list) + { + if(!result.includes(item)) + { + result.push(item) + } + } + return result; + +} +module.exports = dedupe; \ No newline at end of file diff --git a/Sprint-1/implement/dedupe.test.js b/Sprint-1/implement/dedupe.test.js index 23e0f8638..04d0edaa6 100644 --- a/Sprint-1/implement/dedupe.test.js +++ b/Sprint-1/implement/dedupe.test.js @@ -17,7 +17,18 @@ E.g. dedupe([1, 2, 1]) target output: [1, 2] // When passed to the dedupe function // Then it should return an empty array test.todo("given an empty array, it returns an empty array"); - +test("given an empty array, it returns an empty array", ()=>{ + const list = []; + expect(dedupe(list)).toEqual([]); +}); +test +("array with no duplicate should return copy of original", ()=>{ + let list = [1,2,4,6,9,8]; + expect(dedupe(list)).toEqual([1,2,4,6,9,8]); +}); +test("shoiuld remove the duplicate value and preserving the first occurebce",()=>{ + expect(dedupe([5, 1, 1, 2, 3, 2, 5, 8])).toEqual([5,1,2,3,8]); +}) // Given an array with no duplicates // When passed to the dedupe function // Then it should return a copy of the original array From 2b3cdc0ad01a6e4b68b4a9a3b7d2187d35d8e92e Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Tue, 10 Mar 2026 20:25:32 +0000 Subject: [PATCH 03/15] Implement findMax function and ignore non-numeric values --- Sprint-1/implement/max.js | 15 +++++++++++++++ Sprint-1/implement/max.test.js | 29 ++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Sprint-1/implement/max.js b/Sprint-1/implement/max.js index 6dd76378e..e69260ad5 100644 --- a/Sprint-1/implement/max.js +++ b/Sprint-1/implement/max.js @@ -1,4 +1,19 @@ function findMax(elements) { + if(elements.length === 0) + { + return -Infinity; + } + let max = -Infinity ; + for (const item of elements) +{ + if (typeof item === 'number') + { + max = Math.max(max , item); + } + + +} + return max; } module.exports = findMax; diff --git a/Sprint-1/implement/max.test.js b/Sprint-1/implement/max.test.js index 82f18fd88..afcf84bdc 100644 --- a/Sprint-1/implement/max.test.js +++ b/Sprint-1/implement/max.test.js @@ -16,7 +16,34 @@ const findMax = require("./max.js"); // When passed to the max function // Then it should return -Infinity // Delete this test.todo and replace it with a test. -test.todo("given an empty array, returns -Infinity"); +test("given an empty array should return -Infinity", () => { + const list = []; + expect(findMax(list)).toEqual(-Infinity); +}); +test("Array with one number should return that number", () => { + const list =[7]; + expect(findMax(list)).toEqual(7); +}); +test("An array with both positive and negative number should return the largest overall", () =>{ + const list = [-10, 5, 30, -3]; + expect(findMax(list)).toEqual(30); +}); +test("Array with just negative number should return the closest on to zero", () =>{ + const list = [-10, -3, -20,-7,-4] + expect(findMax(list)).toEqual(-3); +}); +test("An array with decimal number should return largest decimal number", ()=>{ + const list = [1.2, 3.5, 2.8] + expect(findMax(list)).toEqual(3.5); +}); +test("An array with non-numeric values should return the max and ignore non-numeric", () =>{ + const list = ['hey', 10, 'hi', 60, 50]; + expect(findMax(list)).toEqual(60); +}); +test("An array with non numeric value should return the least surprising value given how it behaves for all other inputs", ()=> { + const list = ['a', 'b', 'hello']; + expect(findMax(list)).toEqual(-Infinity); +}) // Given an array with one number // When passed to the max function From f59026c5cc6956e22c3443cb948f283b9f547c77 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Tue, 10 Mar 2026 20:51:53 +0000 Subject: [PATCH 04/15] Implement sum function --- Sprint-1/implement/sum.js | 15 +++++++++++++++ Sprint-1/implement/sum.test.js | 29 ++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/Sprint-1/implement/sum.js b/Sprint-1/implement/sum.js index 9062aafe3..7bb139801 100644 --- a/Sprint-1/implement/sum.js +++ b/Sprint-1/implement/sum.js @@ -1,4 +1,19 @@ function sum(elements) { + if (elements.length === 0) + { + return 0; + } + let total = 0 ; + for (const item of elements) +{ + if (typeof item === 'number') + { + total = total + item; + } + + +} + return total; } module.exports = sum; diff --git a/Sprint-1/implement/sum.test.js b/Sprint-1/implement/sum.test.js index dd0a090ca..0598d34ab 100644 --- a/Sprint-1/implement/sum.test.js +++ b/Sprint-1/implement/sum.test.js @@ -13,7 +13,34 @@ const sum = require("./sum.js"); // Given an empty array // When passed to the sum function // Then it should return 0 -test.todo("given an empty array, returns 0") +test("given an empty array should return -Infinity", () => { + const list = []; + expect(sum(list)).toEqual(0); +}); +test("Array with one number should return that number", () => { + const list =[7]; + expect(sum(list)).toEqual(7); +}); +test("An array with both positive and negative number should return the largest overall", () =>{ + const list = [-10, 5, 30, -3]; + expect(sum(list)).toEqual(22); +}); +test("Array with just negative number should return the closest on to zero", () =>{ + const list = [-10, -3, -20,-7,-4] + expect(sum(list)).toEqual(-44); +}); +test("An array with decimal number should return largest decimal number", ()=>{ + const list = [1.2, 3.5, 2.8] + expect(sum(list)).toEqual(7.5); +}); +test("An array with non-numeric values should return the max and ignore non-numeric", () =>{ + const list = ['hey', 10, 'hi', 60, 50]; + expect(sum(list)).toEqual(120); +}); +test("An array with non numeric value should return the least surprising value given how it behaves for all other inputs", ()=> { + const list = ['a', 'b', 'hello']; + expect(sum(list)).toEqual(0); +}) // Given an array with just one number // When passed to the sum function From b473ef0fa3fde08b49048086b8fe53f70f55c273 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Wed, 11 Mar 2026 10:19:18 +0000 Subject: [PATCH 05/15] Refactor includes to use for...of loop --- Sprint-1/refactor/includes.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sprint-1/refactor/includes.js b/Sprint-1/refactor/includes.js index 29dad81f0..8c9ae2e66 100644 --- a/Sprint-1/refactor/includes.js +++ b/Sprint-1/refactor/includes.js @@ -1,8 +1,7 @@ // Refactor the implementation of includes to use a for...of loop function includes(list, target) { - for (let index = 0; index < list.length; index++) { - const element = list[index]; + for (const element of list) { if (element === target) { return true; } From dba93c73529424f25b81f606d10114337622dbf2 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sat, 14 Mar 2026 23:18:06 +0000 Subject: [PATCH 06/15] fix: correct property access to retrieve houseNumber from address object --- Sprint-2/debug/address.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-2/debug/address.js b/Sprint-2/debug/address.js index 940a6af83..fde180d6d 100644 --- a/Sprint-2/debug/address.js +++ b/Sprint-2/debug/address.js @@ -12,4 +12,4 @@ const address = { postcode: "XYZ 123", }; -console.log(`My house number is ${address[0]}`); +console.log(`My house number is ${address["houseNumber"]}`); From 00cbd0933891eb315c2be60791fb74737ea4bdd8 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sat, 14 Mar 2026 23:52:09 +0000 Subject: [PATCH 07/15] fix: iterate through ingredients array to print each ingredient --- Sprint-2/debug/recipe.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Sprint-2/debug/recipe.js b/Sprint-2/debug/recipe.js index 6cbdd22cd..15a450935 100644 --- a/Sprint-2/debug/recipe.js +++ b/Sprint-2/debug/recipe.js @@ -1,5 +1,6 @@ // Predict and explain first... - +//The title and serves values print correctly because the properties are accessed directly using +// recipe.title and recipe.serves. // This program should log out the title, how many it serves and the ingredients. // Each ingredient should be logged on a new line // How can you fix it? @@ -10,6 +11,11 @@ const recipe = { ingredients: ["olive oil", "tomatoes", "salt", "pepper"], }; -console.log(`${recipe.title} serves ${recipe.serves} - ingredients: -${recipe}`); +console.log(`${recipe.title} serves ${recipe.serves}`); +for(const ingredients of recipe.ingredients) +{ + console.log(`*${ingredients}`) +} + +//The program prints the recipe title and number of servings. +// Then it loops through the ingredients array and logs each ingredient on a new line so they are displayed individually instead of printing the whole object. \ No newline at end of file From aebc4bd4ab9e3db555316e1d347ebcbce77cc8c1 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 15 Mar 2026 00:17:51 +0000 Subject: [PATCH 08/15] fix: log all author object values using Object.values --- Sprint-2/debug/author.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Sprint-2/debug/author.js b/Sprint-2/debug/author.js index 8c2125977..876962002 100644 --- a/Sprint-2/debug/author.js +++ b/Sprint-2/debug/author.js @@ -1,5 +1,6 @@ // Predict and explain first... - +// The program throws an error because a for...of loop only works with iterable values like arrays or strings. +// The author variable is an object, which is not iterable by default, so JavaScript cannot loop through it. // This program attempts to log out all the property values in the object. // But it isn't working. Explain why first and then fix the problem @@ -10,7 +11,11 @@ const author = { age: 40, alive: true, }; - -for (const value of author) { - console.log(value); +const values = Object.values(author); +for(const item of values) +{ + console.log(item); } + + + From 964724902b0bc8907a22ef252403da8dc3a1227c Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 15 Mar 2026 07:03:12 +0000 Subject: [PATCH 09/15] feat: implement createLookup to convert country-currency pairs into lookup object --- Sprint-2/implement/lookup.js | 10 ++++++++-- Sprint-2/implement/lookup.test.js | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Sprint-2/implement/lookup.js b/Sprint-2/implement/lookup.js index a6746e07f..e5f1addc0 100644 --- a/Sprint-2/implement/lookup.js +++ b/Sprint-2/implement/lookup.js @@ -1,5 +1,11 @@ -function createLookup() { - // implementation here +function createLookup(countryCurrencyPairs) { + const countryCurrencyLookup = {}; + + for (let item of countryCurrencyPairs) { + const [key, value] = [item[0], item[1]]; + countryCurrencyLookup[key] = value; + } + return countryCurrencyLookup; } module.exports = createLookup; diff --git a/Sprint-2/implement/lookup.test.js b/Sprint-2/implement/lookup.test.js index 547e06c5a..a1b82e864 100644 --- a/Sprint-2/implement/lookup.test.js +++ b/Sprint-2/implement/lookup.test.js @@ -2,6 +2,15 @@ const createLookup = require("./lookup.js"); test.todo("creates a country currency code lookup for multiple codes"); +test("An array of arrays representing country code and currency code should return an object where the keys are country code values are currency code",()=>{ + const countryCurrencyPairs = [['IND', 'INR'], ['US', 'USD'], ['UK', 'GBR'], ['CA','CAD'] ]; + expect(createLookup(countryCurrencyPairs)).toEqual({ + IND: "INR", + US: "USD", + UK: "GBR", + CA: "CAD", + }); +}) /* Create a lookup object of key value pairs from an array of code pairs From e4b21305b71519a8052544ccb5e52b570c7dff0f Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 15 Mar 2026 08:25:31 +0000 Subject: [PATCH 10/15] fix: improve querystring parser and add edge case tests --- Sprint-2/implement/querystring.js | 6 ++++-- Sprint-2/implement/querystring.test.js | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Sprint-2/implement/querystring.js b/Sprint-2/implement/querystring.js index 45ec4e5f3..118a27b53 100644 --- a/Sprint-2/implement/querystring.js +++ b/Sprint-2/implement/querystring.js @@ -5,8 +5,10 @@ function parseQueryString(queryString) { } const keyValuePairs = queryString.split("&"); - for (const pair of keyValuePairs) { - const [key, value] = pair.split("="); + for (const item of keyValuePairs) { + const pair = item.split("="); + const key = pair.shift(); + const value = pair.join("="); queryParams[key] = value; } diff --git a/Sprint-2/implement/querystring.test.js b/Sprint-2/implement/querystring.test.js index 3e218b789..c5681bec4 100644 --- a/Sprint-2/implement/querystring.test.js +++ b/Sprint-2/implement/querystring.test.js @@ -10,3 +10,18 @@ test("parses querystring values containing =", () => { "equation": "x=y+1", }); }); +test("An empty string should return an empty object",()=>{ + expect(parseQueryString("")).toEqual({}); +}); +test("parses querystring parameters with an empty value",()=>{ + expect(parseQueryString("name=")).toEqual({name :""}); +}); +test("handles querystring parameters that have no = sign",()=>{ + expect(parseQueryString("flag")).toEqual({flag:""}) +}); +test("parses querystring values containing multiple = characters",()=>{ + expect(parseQueryString("token=a=b=c=d")).toEqual({token:"a=b=c=d"}); +}); +test("handles multiple querystring parameters when one value contains =",()=>{ + expect(parseQueryString("a=1&equation=x=y+1")).toEqual({a:"1", equation:"x=y+1"}); +}); From f5665eb3766d2837f90dd2ca905cfd10e9627cad Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 15 Mar 2026 12:10:58 +0000 Subject: [PATCH 11/15] test: add tests for contains function and fix toThrow usage --- Sprint-2/implement/contains.js | 20 +++++++++++++++++++- Sprint-2/implement/contains.test.js | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Sprint-2/implement/contains.js b/Sprint-2/implement/contains.js index cd779308a..8cee952a2 100644 --- a/Sprint-2/implement/contains.js +++ b/Sprint-2/implement/contains.js @@ -1,3 +1,21 @@ -function contains() {} +function contains(object, propertyName) { + if(typeof object !== 'object' || Array.isArray(object) || object=== null) + { + throw new Error("It is a invalid object") + } + const newArray = Object.keys(object); + for(let item of newArray) + { + if (item === propertyName) + { + return true + } + + + + } + return false; +} + module.exports = contains; diff --git a/Sprint-2/implement/contains.test.js b/Sprint-2/implement/contains.test.js index 326bdb1f2..0f020858d 100644 --- a/Sprint-2/implement/contains.test.js +++ b/Sprint-2/implement/contains.test.js @@ -11,6 +11,28 @@ E.g. contains({a: 1, b: 2}, 'c') // returns false as the object doesn't contains a key of 'c' */ +test("An empty object should return false",()=>{ + const object = {}; + const propertyName = "a"; + expect(contains(object, propertyName)).toEqual(false); +}); + + +test("returns true when the object contains an existing property name", () => { + const object = { a: 1, b: 2, c: 3 }; + const propertyName = "a"; + expect(contains(object, propertyName)).toEqual(true); +}); +test("returns false when the object not contains an existing property name", () => { + const object = { a: 1, b: 2, c: 3 }; + const propertyName = "d"; + expect(contains(object, propertyName)).toEqual(false); +}); +test("Should throw an error for an invalid parameters", () => { + const object = [1,2,3,4,5,6,7]; + const propertyName = "a"; + expect(() => contains(object, propertyName)).toThrow(); +}); // Acceptance criteria: // Given a contains function From d15e236c9737efcf6264cdb7afbea69fdd12627c Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Sun, 15 Mar 2026 12:13:11 +0000 Subject: [PATCH 12/15] test: add tests for contains function and fix toThrow usage --- Sprint-2/implement/contains.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sprint-2/implement/contains.test.js b/Sprint-2/implement/contains.test.js index 0f020858d..b64015f11 100644 --- a/Sprint-2/implement/contains.test.js +++ b/Sprint-2/implement/contains.test.js @@ -33,6 +33,16 @@ test("Should throw an error for an invalid parameters", () => { const propertyName = "a"; expect(() => contains(object, propertyName)).toThrow(); }); +test("Should throw an error for an invalid parameters", () => { + const object = null; + const propertyName = "a"; + expect(() => contains(object, propertyName)).toThrow(); +}); +test("Should throw an error for an invalid parameters", () => { + const object = "hi"; + const propertyName = "a"; + expect(() => contains(object, propertyName)).toThrow(); +}); // Acceptance criteria: // Given a contains function From e34b8ed3ba107df756309a7d39a5ae56efa2630a Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Mon, 16 Mar 2026 20:33:27 +0000 Subject: [PATCH 13/15] fix: correct tally test to call the tally function --- Sprint-2/implement/tally.js | 17 ++++++++++++++++- Sprint-2/implement/tally.test.js | 9 +++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Sprint-2/implement/tally.js b/Sprint-2/implement/tally.js index f47321812..88ff23bb1 100644 --- a/Sprint-2/implement/tally.js +++ b/Sprint-2/implement/tally.js @@ -1,3 +1,18 @@ -function tally() {} +function tally(arr) { + const object = {}; + if(!Array.isArray(arr)) + { + throw new Error("Invalid input: tally expects an array"); + } + if(arr.length === 0) + { + return object; + } + arr.forEach(ele =>{ + object[ele] =(object[ele] || 0) + 1; + + }); + return object; +} module.exports = tally; diff --git a/Sprint-2/implement/tally.test.js b/Sprint-2/implement/tally.test.js index 2ceffa8dd..691b622be 100644 --- a/Sprint-2/implement/tally.test.js +++ b/Sprint-2/implement/tally.test.js @@ -13,6 +13,15 @@ const tally = require("./tally.js"); * tally(['a', 'a', 'a']), target output: { a: 3 } * tally(['a', 'a', 'b', 'c']), target output: { a : 2, b: 1, c: 1 } */ +test("throws an error when the input is not an array", ()=>{ + expect(()=>tally("hi")).toThrow(); +}); +test("returns an empty object when the input array is empty",()=>{ + expect(tally([])).toEqual({}); +}); +test("returns the count of each unique item in the array", ()=>{ + expect(tally(['a','b','a','c','b','a'])).toEqual({a:3,b:2,c:1}) +}); // Acceptance criteria: From 575847d16b7d7a5d50bc885879ffb9828b4945d4 Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Tue, 17 Mar 2026 08:19:49 +0000 Subject: [PATCH 14/15] feat: implement invert function and add tests for key-value swapping --- Sprint-2/interpret/invert.js | 11 +++++++++-- Sprint-2/interpret/invert.test.js | 10 ++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Sprint-2/interpret/invert.test.js diff --git a/Sprint-2/interpret/invert.js b/Sprint-2/interpret/invert.js index bb353fb1f..0cdc4da5e 100644 --- a/Sprint-2/interpret/invert.js +++ b/Sprint-2/interpret/invert.js @@ -9,21 +9,28 @@ function invert(obj) { const invertedObj = {}; - for (const [key, value] of Object.entries(obj)) { - invertedObj.key = value; + for (const [value, key] of Object.entries(obj)) { + invertedObj[key] = value; } return invertedObj; } +module.exports = invert; // a) What is the current return value when invert is called with { a : 1 } +//{key:1} // b) What is the current return value when invert is called with { a: 1, b: 2 } +//{key:1, key : 2} // c) What is the target return value when invert is called with {a : 1, b: 2} +// {'1':'a','2':'b'} // c) What does Object.entries return? Why is it needed in this program? +// Object.entries() returns an array of [key, value] pairs from an object. It is used here to loop through the object and access both the key and value in each iteration. // d) Explain why the current return value is different from the target output +// The return value is different because the program uses dot notation with a variable instead of bracket notation. +// Also, the object needs to be inverted, so the key and value must be swapped when iterating through the entries. // e) Fix the implementation of invert (and write tests to prove it's fixed!) diff --git a/Sprint-2/interpret/invert.test.js b/Sprint-2/interpret/invert.test.js new file mode 100644 index 000000000..a5d0a564b --- /dev/null +++ b/Sprint-2/interpret/invert.test.js @@ -0,0 +1,10 @@ +const invert = require("./invert"); + +test("returns an object with the key and value swapped when given a single key-value pair", ()=>{ + expect(invert({a:1})).toEqual({'1':'a'}) +}); + +test("returns an object with all keys and values swapped for multiple key-value pairs",()=>{ + + expect(invert({a:1, b:2})).toEqual({'1':'a','2':'b'}) +}); \ No newline at end of file From 4eae7cb5810bb4830621d6d52cbb99734dc85ead Mon Sep 17 00:00:00 2001 From: Arunkumar Akilan Date: Tue, 17 Mar 2026 08:44:16 +0000 Subject: [PATCH 15/15] fix: remove unintended Sprint-1 changes from Sprint-2 PR --- Sprint-1/implement/dedupe.js | 2 +- package.json | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 package.json diff --git a/Sprint-1/implement/dedupe.js b/Sprint-1/implement/dedupe.js index b19b591e3..e15439a83 100644 --- a/Sprint-1/implement/dedupe.js +++ b/Sprint-1/implement/dedupe.js @@ -8,7 +8,7 @@ function dedupe(list) { { if(!result.includes(item)) { - result.push(item) + result.push(item); } } return result; diff --git a/package.json b/package.json new file mode 100644 index 000000000..40fec1762 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "module-data-groups", + "version": "1.0.0", + "description": "Like learning a musical instrument, programming requires daily practice.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/arunkumarakilan/Module-Data-Groups.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "type": "commonjs", + "bugs": { + "url": "https://github.com/arunkumarakilan/Module-Data-Groups/issues" + }, + "homepage": "https://github.com/arunkumarakilan/Module-Data-Groups#readme", + "devDependencies": { + "jest": "^30.2.0" + } +}