CodeWars Challenges: Visit Here
A repository filled with codewars challenges (katas).
Everyday, the first thing I do is solve a Codewar!
I consistently refactor and optimize my code, sometimes for efficiency, sometimes for readability.
| Kata File | Description | Key Concepts | Kyu |
|---|---|---|---|
CreatePhoneNumber.js |
- | - | - |
Messi.goals.function.js |
- | - | - |
Unique-In-Order.js |
- | - | - |
areTheyTheSame.js |
- | - | - |
areYouPlayingBanjo.js |
Return message based on whether name starts with 'R' | Conditional logic, string indexing | 8kyu |
binaryAddition.js |
- | - | - |
booleanValuesToStrings.js |
Return "Yes" or "No" based on boolean value | Ternary operator, boolean evaluation | 8kyu |
breakCamelCase.js |
Insert spaces before uppercase letters in camelCase | Regex lookahead /(?=[A-Z])/g, string replacement |
6kyu |
buildAPileOfCubes.js |
- | - | - |
convertAStringToNumber.js |
- | - | - |
countTheDivisorsOfANumber.js |
- | - | - |
countTheSmileyFaces.js |
- | - | - |
deoxyribonucleicAcid.js |
- | - | - |
doubleChar.js |
- | - | - |
findTheOddInt.js |
- | - | - |
findThePerfectSquare.js |
- | - | - |
grasshopperDebugSayHello.js |
Fix function to return a greeting with the given name | String interpolation, return statement | 8kyu |
growthOfAPopulation.js |
- | - | - |
howGoodAreYouReally.js |
Compare your score to the average of your class | reduce(), array length, arithmetic logic |
8kyu |
isItEven.js |
- | - | - |
jadenCasingStrings.js |
- | - | - |
keepUpTheHoop.js |
Return motivational message based on number of hoops | Ternary operator | 8kyu |
listFiltering.js |
- | - | - |
makeUpperCase.js |
Convert a string to uppercase | String methods | 8kyu |
oppositeNumber.js |
- | - | - |
parseNiceIntFromCharProblem.js |
- | - | - |
persistentBugger.js |
- | - | - |
printerErrors.js |
- | - | - |
returnNegative.js |
Return the negative version of a number | Ternary operator, number comparison | 8kyu |
sentenceSmash.js |
Join an array of words into a sentence | join() method |
8kyu |
shortestWord.js |
- | - | - |
squareEveryDigit.js |
Square each digit and concatenate the results | String conversion, map, join, Number constructor | 7kyu |
squareSum.js |
- | - | - |
sumArrays.js |
Return the sum of values in an array | reduce(), null checking |
8kyu |
sumOfTheFirstNthTermOfSeries.js |
- | - | - |
sumOfTwoLowestPositiveIntegers.js |
Return the sum of the two smallest positive numbers | sort(), array slicing |
7kyu |
theHighestProfitWins.js |
- | - | - |
whoLikesIt.js |
- | - | - |
isIsogram.js |
check if a string is an isogram using Set and case normalization | Set() |
7kyu |
Function 2 - squaring an argument |
Return the square of a number using multiplication | square |
8kyu |
| removeSmallest.js | Remove the smallest number from an array without mutating it | .indexOf(), .filter(), Math.min() |
7kyu |
| isSquare.js | Check if a number is a perfect square | Math.sqrt(), Number.isInteger() |
7kyu |
| arrayDiff.js | Remove all elements in A that exist in B | filter(), includes() |
6kyu |
| countSheep.js | Count the number of true values in an array |
.filter(), boolean logic |
8kyu |
| bouncingBall.js | Count how many times a ball passes in front of a window while bouncing | while, Math, control flow |
6kyu |
| twoSum.js | Find two indices whose values add up to the target | nested loops, indexing, array traversal | 6kyu |
| isUpperCase.js | Add a custom method to String prototype to check if it's uppercase | String.prototype, this, .toUpperCase() |
8kyu |
| noSpace.js | Remove all spaces from a string | .replace(), RegEx, .split().join() |
8kyu |
| accum.js | Format string to accum pattern with upper + lower repeats | .map(), .repeat(), .toUpperCase() |
7kyu |
| getMiddle.js | Return the middle character(s) of a string | substring(), Math.floor() |
7kyu |
| alternatingCase.js | Convert each letter to its opposite case | String.prototype, .map(), .toUpperCase(), .toLowerCase() |
8kyu |
| descendingOrder.js | Rearrange digits of a number in descending order | String(), .split(), .sort(), .reverse(), Number() |
7kyu |
| countByX.js | Return the first n multiples of x in array form |
for loop, .push(), multiplication |
8kyu |
| directionsReduction.js | Simplify path by removing opposite directions | stack, object lookup, logic flow |
5kyu |
| isAnagram.js | Check if two words are anagrams | .toLowerCase(), .split(), .sort(), .join() |
7kyu |
| maxSequence.js | Find the maximum sum of a contiguous subarray | Kadane’s algorithm, greedy, subarray sum |
5kyu |
| getSum.js | Return the sum of all integers between two numbers (inclusive) | Math.min(), Math.max(), for loop |
7kyu |
| convertStringToCamelCase.js | Convert dash/underscore-delimited strings to camelCase | replace(), RegEx groups, callbacks |
6kyu |
| extractTheDomainNameFromAUrl.js | Extract domain name from a full URL string | .replace(), .split() |
5kyu |
| testing123.js | Add line numbers to a list of strings | for loop, .map(), string interpolation |
7kyu |
digitize.js |
Convert a number into an array of its digits in reverse order | String(), .split(), .reverse(), .map(Number) |
8kyu |
| categorizeNewMember.js → Categorize club members as 'Senior' or 'Open' based on age and handicap. | |||
| friendOrNot.js → Return only names with exactly 4 letters from a list. | filter() |
7kyu | |
reverseListOrder.js → Reverse a given list using .reverse(). |
|||
| findTheMiddleElement.js | Return the index of the number that lies between the other two in a triplet | [...arr], .sort(), .indexOf() |
8kyu |
| playingWithDigits.js | Return the multiplier k such that the powered digits of n equal k * n, or -1 | Math.pow(), for loop, modulo % |
6kyu |
| sortNumbers.js | Sort numbers in ascending order, return empty array if input is null | [...arr], .sort(), ternary ? : |
8kyu |
| sumMixedArray.js | Sum numbers and strings as if all were numbers | .reduce(), Number() |
8kyu |
| reverseWordsInAString.js | Reverse each word in a string without changing their order | .split(), .map(), .reverse(), .join() |
7kyu |
| nameShuffler.js | Reverse order of first and last name in a string | .split(), .reverse(), .join() |
8kyu |
| getLetterGrade.js | Return letter grade based on average of three scores | average calculation, if statements |
8kyu |
| longestConsecutiveStrings.js | Return the longest string formed by k consecutive strings | .slice(), .join(), loop, length comparison |
6kyu |
| gooseFilter.js | Filter out geese from an array of bird names | .filter(), .includes(), array exclusion |
8kyu |
| crashOverride.js | Generate hacker alias based on name initials using predefined objects | .toUpperCase(), .match(), object lookup |
8kyu |
| getVolumeOfCuboid.js | Calculate cuboid volume using a static method in a class | class, static, multiplication |
8kyu |
| removeUrlAnchor.js | Remove everything after '#' in a URL string | .split(), [0], string manipulation |
8kyu |
| findTheNeedle.js | Find the index of "needle" in an array and return message | .indexOf(), template literals |
8kyu |
| endsWithCheck.js | Return true if string ends with given substring | .endsWith() |
7kyu |
| greetUser.js | Greet user by name using template literals | template literals, string interpolation | 8kyu |
| declareWinner.js | Determine winner between two fighters using turn-based attacks | class, .name, .damagePerAttack, loop logic |
7kyu |
- ✅ Applied lookahead regex
/(?=[A-Z])/gto elegantly handle camel case separation. - ✅ Improved test coverage awareness by identifying edge cases and suggesting enhancements in public kata repositories (e.g.,
makeNegative). - ✅ Refactored conditional logic into concise, readable ternary expressions for functions like
hoopCount. - ✅ Regularly pushing kata solutions with commit messages and study guides following the PREP method for clarity and future review.
- ✅ Practicing deliberate problem-solving through classic loops, functional approaches, and edge-case analysis across JavaScript fundamentals.
Solving is just the start.
I care about why things work, how clean the solution is, and how it could scale or integrate in real-world contexts.
Whether working solo or as part of a team, I focus on writing logic that’s intentional, consistent, and easy to build on.
Explore extra versions, clever experiments, and one-liner variations in alt-solutions.js.
This file collects alternate solutions for katas already solved in the main table above. It’s a space for learning, exploring different approaches, and seeing how a single problem can be solved in multiple ways.