Library
easy
Array Index Kata
Complete the functions to find the index of an element in an array using Array.prototype.indexOf().
easy
Array Concat Kata
Combine two arrays into a single array using the Array.prototype.concat() method
easy
Last Index Of Substring Kata
Create a function that searches for the last index of a substring in an array using Array.prototype.lastIndexOf().
medium
String Replace All Kata
Create a function that replaces all instances of a given substring with another string within a larger string using String.prototype.replaceAll() method.
medium
Split String Kata
A kata that requires the student to use String.prototype.split() to split a given string into substrings and perform a specified operation on them.
easy
Splitting Strings
Given a sentence, split it into an array of words using the String.prototype.split() method.
easy
String to Local Uppercase Kata
In this kata, you will be working with the String.prototype.toLocaleUpperCase() method to convert a string to uppercase according to the user's locale.
easy
Repeat String
Create a function that repeats a given string n times.
easy
Array Type Check
Write a function that checks if a given variable is an array. If it is an array, return true, otherwise return false.
easy
String toString()
Write a function that converts a given string to its string representation using the toString() method.
easy
String padding kata
Create a function that takes a string and a number as arguments, and pads the string on the right side with spaces until the string reaches the desired length.
easy
Word sorting
Sort an array of words based on their alphabetical order using String.prototype.localeCompare() method.
easy
String endsWith Kata
Create a function that checks if a given string ends with a specified suffix.
medium
Array Grouping Kata
Implement a function that groups the elements of an array based on a given predicate function.
easy
String includes
Create a function that takes in two parameters, a string and a substring, and checks if the string includes the substring. Return a boolean value.
easy
Trim Ending Spaces
Write a function that takes a string and removes any trailing whitespace at the end of it using String.prototype.trimEnd().
medium
Find Index Kata
Write a JavaScript function to find the index of an item in an array using Array.prototype.findIndex().
easy
Set Milliseconds Kata
Implement a function that sets the milliseconds of a given date object to a specified value.
easy
String Concatenation Kata
Create a function that concatenates two strings using the String.prototype.concat() method.
easy
CharAt Kata
Implement a function that returns the character at the specified index of a given string.
medium
Match Substrings in a String
Write a function that takes a string and a regular expression and returns an array of all the substrings in the string that match the regular expression.
easy
Substring Kata
Given a string, return a new string that is a substring of the original string. The substring should start at a specified index and continue until the end of the original string.
easy
Last Occurrence of a Substring in a String
Write a function that takes a string and a substring as arguments, and finds the last occurrence of the substring in the string. If the substring is not found, return -1.
easy
String includes kata
Implement a function that takes an array of strings and a search string, and returns a new array containing only the strings that includes the search string using String.prototype.includes() method.
easy
Every Check
Write a function that checks if every element in an array satisfies a given condition.
easy
Set Event Start Time
Create a function that takes a start time and an event duration and returns the end time of the event, using the Date.prototype.setHours() method to set the hours of the start time.
easy
Anagram Checker
Create a function that determines if two strings are anagrams of each other.
medium
Recursive Factorial Function
Write a function that uses recursion to calculate the factorial of a given positive integer.
easy
Array Every
Create a function that uses Array.prototype.every() to check if all the elements in an array meet a certain condition.
easy
Normalize String Kata
Create a function that normalizes a string using String.prototype.normalize method.
easy
Replace First Occurrence of String
Write a function that replaces the first occurrence of a specific string in a given string.
medium
Array Entries Kata
Create a function that uses Array.prototype.entries() to iterate over an array and perform some operations.
easy
Search for Substring Kata
Create a function to search for a substring in a given string using String.prototype.search() method.
medium
Grouping Arrays to Map
Given an array of objects, group the objects based on a specific key and return a map object.
medium
Recursive Fibonacci Sequence
Write a function that returns the nth number in the Fibonacci sequence using recursion.
easy
Unicode Kata
Write a function that checks if a given string has a unicode character code point greater than or equal to 128. Use the String.prototype.codePointAt() method.
easy
UTC Month Setter
Create a function that sets the UTC month of a given date object.
medium
Array ToSpliced
Create a function that takes an array and removes a portion of the array, as specified by the arguments, and returns the removed portion.
medium
String Normalization Kata
Create a function that receives a string and normalizes it using the String.prototype.normalize() method. Apply the NFC normalization form.
easy
String Repeat Kata
Create a function that takes a string and a number, and repeats the string the given number of times.
easy
Code Point At
Convert a string to an array of Unicode code points using String.prototype.codePointAt() method.
easy
String Char Code Kata
Write a function that returns an array of char codes from a string
easy
Array Includes Kata
Write a function that checks if an element is present in an array using Array.prototype.includes() method.
easy
Sort names using localeCompare()
Given an array of person objects, sort them alphabetically by their last name using String.prototype.localeCompare().
easy
String to Uppercase kata
Convert a string to uppercase using String.prototype.toUpperCase();
medium
Array Keys Exercise
Create a function that takes an array as input and returns an array of the keys of the given array using Array.prototype.keys() method.
medium
Array with() method
Implement the Array.prototype.with() method that returns a new array with the elements from the original array and the added elements.
medium
Array Grouping Kata
Implement a function that groups an array of objects by a given key and returns a new array of objects, where each object has a key and an array of objects that have that key.
easy
String Slice Kata
Create a function that takes a string and returns a new string that is a slice of the original string. The function should take two arguments, start and end, which represent the starting and ending indices of the slice.
easy
Pad Start Kata
Create a function that takes in a string and a length and returns a new string with the original string padded with leading spaces if it is shorter than the provided length.
easy
String CharAt Kata
Write a function that extracts a character from a string given an index using String.prototype.charAt()
medium
Array Slice and Splice
Given an array of numbers and a start index, remove a certain number of elements from the array and replace them with new elements.
easy
Set Entries Kata
Implement a function that takes in a Set and returns an array of entries
easy
Convert Date to JSON String
Create a function that takes a Date object and returns a JSON string of the date in ISO format.
easy
String Trim End Kata
Implement a function that uses String.prototype.trimEnd() to trim whitespace at the end of a string.
easy
Reverse Array
Create a function that takes an array and reverse its order in place.
medium
MatchAll Kata
Write a function that takes a string and returns an array of matched patterns using String.prototype.matchAll().
medium
Music Genre Classification
Create a function that takes in an array of music tracks and returns an object with the count of each genre in the array
easy
Sum of numbers using reduceRight()
Write a function that takes an array of numbers and returns their sum, using Array.prototype.reduceRight().
easy
String Padding Kata
Create a function that takes a string and a number and pads that string with a specified character until it reaches the given length.
easy
Joining Arrays Kata
Write a function that joins two arrays into a single string using Array.prototype.join() method.
easy
Get UTC Month
Create a function that returns the month of a Date object in UTC time zone.
easy
Match String Pattern
Write a function that returns the result of a string match with a given pattern.
medium
Array Index Finder
Create a function that takes an array of numbers and returns the index of a given element. Use Array.prototype.findIndex() to implement the function.
easy
String.charAt() Kata
Write a function that accepts a string and a number as arguments, then returns the character at that position in the string. Use String.prototype.charAt() for this exercise.
easy
Unshift Kata
Create a function that takes an array and a value as arguments and adds the value to the beginning of the array using the unshift() method.
medium
Stock Advisor
Create a Stock Advisor that recommends which stocks to buy based on certain parameters.
easy
Hourly Greeting
Create a function that greets the user depending on the current hour of the day.
medium
Date UTC Full Year
Create a function that takes a date and a year and sets the date's UTC full year to the provided year.
easy
Find Last Index Kata
Write a function that takes an array and a value as arguments and returns the index of the last occurrence of that value in the array using Array.prototype.lastIndexOf(). If the value is not found, return -1.
medium
Music genre classification
Create a program that classifies music genres based on certain audio features
easy
Sort Alphabets with localeCompare()
Create a function that sorts an array of strings in alphabetical order using String.prototype.localeCompare()
easy
Array.of() Exercise
Implement equations using the Array.of() method to create arrays.
easy
Find the position of a substring using indexOf()
Write a function that takes in a string and a target substring, and returns the index at which the target substring is first found. If the target substring is not found in the string, return -1. Use the built-in JavaScript method `indexOf()` to solve the problem.
medium
Date ToString Kata
Implement a function that takes a Date object as input and returns a formatted string
easy
Set Keys Kata
Write a function that takes a Set object as a parameter and returns an array of keys using Set.prototype.keys().
easy
Char Code Getter
Create a function that takes a string and returns an array of the char codes for each character in the string
easy
String Slice Kata
Create a function that slices a string based on a given start and end indexes
easy
String IndexOf Kata
Create a function that takes two parameters: a string and a target substring, and returns the index of the first occurrence of the target substring in the string. If the target substring is not found, return -1.
easy
Seconds Counter
Create a function that counts the number of seconds in a given timestamp
easy
Find the First Occurrence of a Substring in a String
Write a function that takes a string and a substring, and returns the index of the first occurrence of the substring in the string. If the substring is not found in the string, return -1.
medium
setYear() Method
Create a function that takes a year (YYYY) and returns the date object with its year set to the provided year.
easy
String Repeat Kata
Create a function that receives a string and a number n, the function should return the string repeated n times.
easy
Match Me If You Can
Create a function that takes two parameters: a string and a regular expression. The function should return an array of all matches found in the string using the regular expression.
easy
String repeat Kata
Create a function that receives a string and a number as parameters. The function should return the string repeated `n` times, where n is the number passed as parameter.
easy
Concatenation Kata
Write a function that concatenates two strings using the String.prototype.concat() method.
easy
String trimStart() Method
Write a function that uses the String.prototype.trimStart() method to remove any whitespace characters from the beginning of a given string.
easy
String Repeat Kata
Implement a function that concatenates a given string 'n' times using the String.prototype.repeat() method.
easy
UTC Date Converter
Write a function that takes a date string as input and converts it to a UTC date string format.
medium
Array Slice Kata
Implement various functionalities using Array.prototype.slice() method
easy
Date Set UTC Seconds
Write a function that accepts a date object and a number of seconds (0 - 59) and returns a new date object with the seconds set to the provided value. The operation should be done using the setUTCSeconds() method.
easy
Array to String Conversion
Convert an array to a string with comma-separated values. The input array can contain numbers, strings, objects, or arrays.
easy
String Replace Kata
Replace all vowels in a string with a '-'.
easy
Set Seconds Kata
Write a function that takes a date object and a number of seconds and returns a new date object with the seconds set to the provided value.
Example input: setSeconds(new Date('2022-10-10T10:10:10'), 30)
Expected output: new Date('2022-10-10T10:10:30')
medium
Precision Cutting Kata
Write a function that takes in a string and uses precision cutting to remove all occurrences of the letter 'e'. Return the resulting string.
easy
String to Uppercase
Create a function that takes a string as input and returns the same string in uppercase letters using the `toString()` method of the String object.
easy
Array Concatenation
Write a function that takes two arrays as arguments and concatenates them into a new array using the Array.prototype.concat() method.
easy
Set forEach Kata
Write a function that loops through a Set using Set.prototype.forEach() method and returns an array containing the results of applying the provided function to each element.
easy
Padding a string
Create a function that accepts a string and a target length. If the length of the string is less than the target length, pad the string with spaces at the beginning until the target length is reached. If the string length is greater than or equal to the target length, return the original string.
easy
Date.now() Kata
Complete the functions provided to properly utilize the Date.now() method.