// 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 Average of an Array using node js |
Write function to implement FizzBuzz using node js |
How to to check if a number is a palindrome using node js |
Write a program to find Reverse a String using node js |
Write program to remove duplicates from an Array |
How to convert Celsius to Fahrenheit using node js |
Check if a String is a Palindrome using node js |
Find the Maximum Number in an Array |