About 24,900 results
Open links in new tab
  1. JavaScript Math.max () Explained with Examples - Guide - The ...

    Jan 17, 2021 · Math Max Math.max() is a function that returns the largest value from a list of numeric values passed as parameters. If a non-numeric value is passed as a parameter, Math.max() will …

  2. Build the Largest Number Finder - The freeCodeCamp Forum

    Oct 22, 2025 · Tell us what’s happening: I tried to complete the lab using this code: const largestOfAll = (arrays) => { let largestNumbers = ; for (currentArray of arrays) { …

  3. Time Complexity/Big O of this algorithm - The freeCodeCamp Forum

    Sep 29, 2017 · Hi Swoodend, You are right on your estimations of the time complexity at the various checkpoints of your algorithm and why they are that way, but there seems to be some confusion on …

  4. Design a Sum All Numbers Algorithm - The freeCodeCamp Forum

    Jul 29, 2025 · Online JavaScript Compiler (Editor) - Programiz Write and run your JavaScript code using our online compiler. Enjoy additional features like code sharing, dark mode, and support for multiple …

  5. Find the Longest Word in a String with Math.max?

    Sep 30, 2019 · In order for Math.max to work, you need to pass it a range of numbers, as stated in MDN: " The Math.max() function returns the largest of zero or more numbers.", you are passing it …

  6. Return Largest Numbers in Arrays, Math.max & spread

    May 28, 2020 · What do you mean by ‘doesn’t log the fifth array’? What output do you get? Ah, I see it. You are push ing max(...arr[j]) and then you are returning inside of the i loop. Your logic is a bit mixed …

  7. Basic Algorithm Scripting - Return Largest Numbers in Arrays

    Nov 9, 2023 · Math.max () - JavaScript | MDN The Math.max () static method returns the largest of the numbers given as input parameters, or -Infinity if there are no parameters.

  8. Math.max.apply () not working inside of a for loop

    Apr 6, 2017 · Math.max () accepts a list of values, like: var a = Math.max(12, 6, 18, 5); But in your code, you’re not sending it a list of values, you’re sending it an array of values. That is a big difference. So, …

  9. Using Math.max to find number - The freeCodeCamp Forum

    Oct 2, 2025 · I see what you were trying to do now. Remember that join() returns a string, right? Here’s an example from MDN for handling an array of numbers with Math.max(): const arr = [1, 2, 3]; const …

  10. freeCodeCamp Challenge Guide: Smallest Common Multiple

    May 8, 2017 · Smallest Common Multiple Problem Explanation The smallest common multiple between two numbers is the smallest number that both numbers can divide into evenly. This concept can be …