Elegant Solutions For jschallenger.com
This series of JavaScript challenges covers basics like strings and operators, and includes exercises to test and reinforce the user's understanding of these concepts.
- Sum two numbers
- Get type of value
- Get nth character of string
- Remove first n characters of string
- Get last n characters of string
- Get first n characters of string
- Find the position of one string in another
- Extract first half of string
- Basic JavaScript math operators
- Remove last n characters of string
- Multiplication, division, and comparison operators
- Comparison operators, strict equality
- Check if a number is even
- Check if a number is a whole number
- Check whether a string contains another string and concatenate
- Round a number to 2 decimal places
- Find next higher natural number that is divisble by y
- Insert character after every n characters (backwards)
- Split a number into its digits
- Find the correct word by incrementing letters in alphabet
- Clear up the chaos behind these strings
- Return the percentage of a number
- How many times does a character occur?
- Return the next higher prime number
This series of challenges tests your knowledge about Javascript arrays.
- Get nth element of array
- Remove first n elements of an array
- Get last n elements of an array
- Get first n elements of an array
- Sort an array of strings alphabetically
- Sort an array of numbers in descending order
- Calculate the sum of an array of numbers
- Return the average of an array of numbers
- Return last n array elements
- Sum up all array elements with values greater than
- Remove a specific array element
- Count number of elements in JavaScript array
- Count number of negative values in array
- Check if all array elements are equal
- Create a range of numbers
- Return the longest string from an array of strings
- Define an array with conditional elements
- Merge an arbitrary number of arrays
- Sort array by object property
- Merge two arrays with duplicate values
- Group array of strings by first letter.
- Get every nth element of array
This series of challenges tests your knowledge about Javascript dates.
- Return the next nearest quarter hour of a date
- Check if two dates fall on the exact same day
- Check if two dates are equal
- Check if one date is earlier than another
- Add n days to an existing date
- Check if two dates are within 1 hour from each other
- Return the number of days between two dates
- Calculate difference between two dates in hours, minutes, and seconds
- Return the next nearest quarter hour of a date
This series of challenges tests your knowledge about Javascript objects.
- Accessing object properties two
- Accessing object properties one
- Accessing object properties three
- Check if property exists in object
- Check if property exists in object and is truthy
- Creating Javascript objects one
- Creating Javascript objects two
- Creating Javascript objects three
- Extract keys from Javascript object
- Return nested object property
- Sum object values
- Remove a property from an object
- Swap object keys and values
- Add property to each object in array
- Merge two objects with matching keys
- Multiply all object values by x
- Extracting information from objects
- Replace empty strings in object with null values
- Convert array to object with counter
This series of challenges covers the Javascript Set object.
- Check if value is present in Set
- Convert a Set to Array
- Get union of two sets
- Creating Javascript Sets
- Delete element from Set
- Add multiple elements to Set
- Get Intersection of two Javascript Sets
- Select the button element on the page
- Query descendent HTML elements
- Select multiple HTML elements
- Query and exclude HTML elements