diff --git a/package-lock.json b/package-lock.json index f52962a..07e1f56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1308,14 +1308,20 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001261", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001261.tgz", - "integrity": "sha512-vM8D9Uvp7bHIN0fZ2KQ4wnmYFpJo/Etb4Vwsuc+ka0tfGDHvOPrFm6S/7CCNLSOkAUjenT2HnUPESdOIL91FaA==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] }, "node_modules/chalk": { "version": "4.1.2", @@ -4985,9 +4991,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001261", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001261.tgz", - "integrity": "sha512-vM8D9Uvp7bHIN0fZ2KQ4wnmYFpJo/Etb4Vwsuc+ka0tfGDHvOPrFm6S/7CCNLSOkAUjenT2HnUPESdOIL91FaA==", + "version": "1.0.30001412", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001412.tgz", + "integrity": "sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==", "dev": true }, "chalk": { diff --git a/solution.js b/solution.js index 049257f..e7a23e9 100644 --- a/solution.js +++ b/solution.js @@ -2,71 +2,71 @@ const { nums, words } = require("./data/data.js"); // Every const isEveryNumGreaterThan2 = () => { - // + return nums.every((num) => num > 2); }; const isEveryWordShorterThan7 = () => { - // + return words.every((word) => word.length < 7); }; // Filter const arrayLessThan5 = () => { - // + return nums.filter((num) => num < 5); }; const arrayOddLengthWords = () => { - // + return words.filter((word) => word.length % 2 !== 0); }; // Find const firstValDivisibleBy4 = () => { - // + return nums.find((num) => num % 4 === 0); }; const firstWordLongerThan4Char = () => { - // + return words.find((word) => word.length > 4); }; // Find Index const firstNumIndexDivisibleBy3 = () => { - // + return nums.findIndex((num) => num % 3 === 0); }; const firstWordIndexLessThan2Char = () => { - // + return words.findIndex((word) => word.length < 2); }; // For Each const logValuesTimes3 = () => { - // + return nums.forEach((num) => num * 3); }; const logWordsWithExclamation = () => { - // + return words.forEach((word) => word + "!"); }; // Map const arrayValuesSquaredTimesIndex = () => { - // + return nums.map((num, i) => num * num * i); }; const arrayWordsUpcased = () => { - // + return words.map((word) => word.toUpperCase()); }; // Some const areSomeNumsDivisibleBy7 = () => { - // + return nums.some((num) => num % 7); }; const doSomeWordsHaveAnA = () => { - // + return words.some((word) => word.includes("a")); }; module.exports = {