-
Write a function
isEventhat takes a number as an argument and returns true if the number is even and false if it is odd. -
Create a function
countVowelsthat takes a string and returns the number of vowels in that string. -
Write a function
reverseStringthat takes a string and returns it reversed (e.g., "hello" becomes "olleh"). -
Create a function
findMaxthat takes an array of numbers and returns the largest number. -
Write a function
isPalindromethat checks if a given string is a palindrome (reads the same backward as forward). -
Create a function
fibonaccithat returns the nth Fibonacci number. -
Write a function
factorialthat calculates the factorial of a given number. -
Create a function
removeDuplicatesthat takes an array and returns a new array without duplicates. -
Write a function
sumArraythat takes an array of numbers and returns the sum. -
Create a function
sortArraythat takes an array of numbers and returns it sorted in ascending order. -
Write a function
stringLengththat returns the length of a given string. -
Create a function
toUpperCasethat takes a string and returns it in uppercase. -
Write a function
capitalizeFirstLetterthat capitalizes the first letter of each word in a string. -
Create a function
mergeArraysthat takes two arrays and merges them into one. -
Write a function
isPrimethat checks if a number is prime. -
Create a function
countWordsthat counts the number of words in a string. -
Write a function
arrayContainsthat checks if an array contains a specific value. -
Create a function
uniqueElementsthat returns an array of unique elements from a given array. -
Write a function
flattenArraythat flattens a nested array. -
Create a function
repeatStringthat takes a string and a number, and returns the string repeated that many times. -
Write a function
getRandomIntthat returns a random integer between two numbers. -
Create a function
averagethat calculates the average of an array of numbers. -
Write a function
removeSpacesthat removes all spaces from a string. -
Create a function
differencethat returns the difference between the largest and smallest numbers in an array. -
Write a function
shuffledArraythat takes an array and returns it shuffled randomly. -
Create a function
longestWordthat returns the longest word in a string. -
Write a function
countDownthat takes a number and counts down to zero, logging each number. -
Create a function
firstNonRepeatingCharthat finds the first non-repeating character in a string. -
Write a function
toTitleCasethat converts a string to title case. -
Create a function
removeElementthat removes a specified element from an array. -
Write a function
swapthat swaps the values of two variables. -
Create a function
countOccurrencesthat counts how many times a specific value appears in an array. -
Write a function
mostFrequentthat finds the most frequently occurring element in an array. -
Create a function
combineStringsthat concatenates two strings with a space in between. -
Write a function
randomColorthat generates and returns a random RGB color. -
Create a function
sumOfDigitsthat returns the sum of the digits of a number. -
Write a function
findIndexthat returns the index of a specific value in an array. -
Create a function
shuffleStringthat shuffles the characters of a string randomly. -
Write a function
secondLargestthat finds the second largest number in an array. -
Create a function
stringToArraythat converts a string to an array of words. -
Write a function
mergeSortedArraysthat merges two sorted arrays into one sorted array. -
Create a function
sumPositiveNumbersthat sums all positive numbers in an array. -
Write a function
extractDomainthat extracts the domain from a URL. -
Create a function
sumEvenNumbersthat sums all even numbers in an array. -
Write a function
getDayOfWeekthat returns the day of the week for a given date. -
Create a function
largestEvenNumberthat finds the largest even number in an array. -
Write a function
mergeObjectsthat merges two objects into one. -
Create a function
capitalizeFirstLetterthat capitalizes the first letter of each word in a string. -
Write a function
randomIntegerthat generates a random integer between two given values. -
Create a function
uniqueArraythat returns an array with duplicate values removed. -
Write a function
isAnagramthat checks if two strings are anagrams of each other (e.g., "listen" and "silent"). -
Create a function
removeVowelsthat takes a string and returns a new string with all vowels removed. -
Write a function
getAgethat calculates the age of a person based on their birth year. -
Create a function
findMissingNumberthat finds the missing number in a given array of consecutive integers. -
Write a function
countUppercasethat counts the number of uppercase letters in a string. -
Create a function
validateEmailthat checks if a given email address is valid. -
Write a function
toggleNavbarthat shows or hides a navigation bar when a button is clicked. -
Create a function
submitFormthat validates a form and submits it if all fields are filled correctly. -
Write a function
addToCartthat adds an item to a shopping cart and updates the cart count. -
Create a function
searchProductsthat searches for products in an array and returns matching results. -
Write a function
sortByPricethat sorts an array of products by their price. -
Create a function
highlightTextthat highlights specific keywords in a block of text. -
Write a function
validatePasswordthat checks if a password meets certain criteria (length, special characters, etc.). -
Create a function
scrollToTopthat scrolls the page to the top smoothly when called. -
Write a function
updateProfilePicturethat allows a user to upload a new profile picture. -
Create a function
validatePhoneNumberthat checks if a phone number is valid based on a specified format. -
Write a function
getCurrentDateTimethat returns the current date and time in a specified format. -
Create a function
generateRandomPasswordthat creates a random password based on user-defined criteria. -
Write a function
rotateArraythat rotates an array to the right by a given number of steps. -
Create a function
comparePasswordsthat checks if two password fields match during registration. -
Write a function
isAdultthat takes an age and returns true if the age is 18 or older, and false otherwise. -
Create a function
concatStringsthat takes two strings and returns them concatenated together. -
Write a function
greetUserthat takes a name and returns a greeting message (e.g., "Hello, [name]!"). -
Create a function
squareNumberthat takes a number and returns its square. -
Write a function
countCharsthat counts the number of characters in a string. -
Create a function
isStringthat checks if a given input is a string and returns true or false. -
Write a function
findMinthat takes an array of numbers and returns the smallest number. -
Create a function
splitStringthat takes a string and returns an array of its characters. -
Write a function
removeLastElementthat takes an array and returns a new array with the last element removed. -
Create a function
toggleCasethat takes a string and toggles the case of each character. -
Write a function
countConsonantsthat takes a string and returns the number of consonants in that string. -
Create a function
removeWhitespacethat removes all leading and trailing whitespace from a string. -
Create a function
highlightSubstringthat highlights a specified substring within a string. -
Write a function
formatCurrencythat takes a number and formats it as a currency string. -
Create a function
getElementByIdthat takes an ID and returns the HTML element with that ID. -
Write a function
formatDate(date)that takes a date object and returns a formatted date string in the format YYYY-MM-DD. -
Create a function
resizeElement(elementId, width, height)that resizes the HTML element with the specified ID to the provided width and height. -
Write a function that flattens a nested array into a single array.
-
Notifications
You must be signed in to change notification settings - Fork 0
Aisha-Ijaz/88-javascript-functions
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published