// Function to find the maximum number in an array
function findMaxNumber(arr) {
return Math.max(...arr);
}
// Example usage
const numbers = [10, 5, 8, 15, 3];
const maxNumber = findMaxNumber(numbers);
console.log(maxNumber);
// Function to find the maximum number in an array
function findMaxNumber(arr) {
return Math.max(...arr);
}
// Example usage
const numbers = [10, 5, 8, 15, 3];
const maxNumber = findMaxNumber(numbers);
console.log(maxNumber);
Related
what is CI/CD: Github Actions? |
How to to check if a number is a palindrome using node js |
Write to function to calculate the factorial of a number |
How to convert Celsius to Fahrenheit using node js |
Find the intersection of two arrays using node js |
How to implement a Queue |
Find the Maximum Number in an Array |
Write a program to find Reverse a String using node js |