const numbers = [12, 34, 23, 56, 45, 67];
const maxNumber = Math.max(...numbers);
console.log('Max Number:', maxNumber);Find Maximum Number in Array Using Math.max
javascript
Related Posts
More content you might like
Code
python
Sort a List
# Define a list of fruits
fruits = ['apple', 'banana', 'cherry', 'date', 'fig']
# Sort the list alphabetically
fruits.sort()
print('Sorted Fruits:', fruits)Jan 26, 2024
Read More Code
python
Calculate Sum of Numbers in a List Using sum() Function
numbers = [1, 2, 3, 4, 5]
sum_of_numbers = sum(numbers)
print('Sum of Numbers:', sum_of_numbers)Jan 26, 2024
Read More Code
python
Generate List of Even Numbers Using List Comprehension
No preview available for this content.
Jan 26, 2024
Read MoreDiscussion 0
Please sign in to join the discussion.
No comments yet. Be the first to share your thoughts!