// 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 intersection of two arrays using node js |
Write a function to capitalize the first letter of each word in a sentence using node js |
Write to function to calculate the factorial of a number |
Find the Maximum Number in an Array |
Find the longest word in a sentence using node js |
How to convert Celsius to Fahrenheit using node js |
Write program to remove duplicates from an Array |
How to implement a Queue |