åé¡ Javascriptã§ãæ°å¤ã®é åãããæ大å¤ãæå°å¤ãæ±ããã çã var a = [3, 1, 4, 1, 5, 9, 2, 6]; Math.max.apply(null, a); // â 9 Math.min.apply(null, a); // â 1 è£è¶³ ä½ãèµ·ãã¦ããã®ãã Math.max(5, 7) // â 7 Math.max(5, 7, 4, 9, 1) // â 9 Math.max ã¯å¯å¤é·ã®å¼æ°ãã¨ãã¾ã Math.max([5, 7, 4, 9, 1]) // â NaN ãããããã¡ã§ã Math.max.apply(null, [5, 7, 4, 9, 1]) // â 9 OKã§ã applyã®ç¬¬ä¸å¼æ°ã¯ä½ã§ããããçµæã¯å¤ãããªãã Math.max.apply({}, [5, 7, 4, 9, 1]) // â 9 OKã§ã Math.
{{#tags}}- {{label}}
{{/tags}}