// Function to reverse a string
function reverseString(str) {
return str.split('').reverse().join('');
}
// Example usage
const reversed = reverseString('Hello, World!');
console.log(reversed);
// Function to reverse a string
function reverseString(str) {
return str.split('').reverse().join('');
}
// Example usage
const reversed = reverseString('Hello, World!');
console.log(reversed);
Related
Find the longest word in a sentence using node js |
Write a function to check if a number is prime using node js |
Write a function to capitalize the first letter of each word in a sentence using node js |
what is CI/CD: Github Actions? |
Write to function to calculate the factorial of a number |
How to implement a Queue |
Find the Maximum Number in an Array |
Write program to remove duplicates from an Array |
