// 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
How to implement a linked list using node js |
How to implement a Stack using node js |
Find the Maximum Number in an Array |
Write a function to check if a number is prime using node js |
Write program to remove duplicates from an Array |
Find the intersection of two arrays using node js |
Find the Average of an Array using node js |
How to implement a simple calculator using node js |
