JavaScript Math.min()
此方法返回指定數字中較小的一個。
注:如果沒有引數,則返回Infinity。如果有某個引數為NaN,或是不能轉換成數字的非數字值,則返回NaN。
語法結構:
[JavaScript] 純文字檢視 複製程式碼Math.min(x,y)
程式碼例項:
[JavaScript] 純文字檢視 複製程式碼執行程式碼console.log(Math.min());
如果沒有引數,則返回-Infinity。
[JavaScript] 純文字檢視 複製程式碼執行程式碼console.log(Math.min(NaN,5));
如果某個引數為NaN,則返回NaN。
[JavaScript] 純文字檢視 複製程式碼執行程式碼console.log(Math.min(4,5));
篩選引數列表中的最小值,4。
相關文章
- Math.min() < Math.max() 返回結果是什麼?為什麼?
- JavaScript高階:JavaScript物件導向,JavaScript內建物件,JavaScript BOM,JavaScript封裝JavaScript物件封裝
- javaScript系列[06]-javaScript和thisJavaScript
- [Javascript] How javascript read the property?JavaScript
- javaScript系列[05]-javaScript和JSONJavaScriptJSON
- “This” is For JavaScriptJavaScript
- This in JavaScriptJavaScript
- JavaScript -"this"JavaScript
- JavaScriptJavaScript
- javascript ??JavaScript
- 44 道 JavaScript 難題(JavaScript Puzzlers!)JavaScript
- [Javascript] Understanding JavaScript Proxies with Symbol.toPrimitiveJavaScriptSymbolMIT
- JavaScript 教程之JavaScript常用框架簡介JavaScript框架
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- javascript — == vs ===JavaScript
- JavaScript selectedIndexJavaScriptIndex
- JavaScript deleteCell()JavaScriptdelete
- JavaScript lastElementChildJavaScriptAST
- JavaScript hasAttribute()JavaScript
- JavaScript getAttributeNode()JavaScript
- JavaScript replaceChild()JavaScript
- JavaScript remove()JavaScriptREM
- JavaScript appendChild()JavaScriptAPP
- JavaScript deleteRow()JavaScriptdelete
- JavaScript clientYJavaScriptclient
- JavaScript之thisJavaScript
- JavaScript isFinite()JavaScript
- JavaScript toggle()JavaScript
- JavaScript Boolean()JavaScriptBoolean
- JavaScript escape()JavaScript
- JavaScript parseFloat()JavaScript
- JavaScript unescape()JavaScript
- JavaScript call()JavaScript
- JavaScript bind()JavaScript
- JavaScript previousElementSiblingJavaScript
- JavaScript preventDefault()JavaScript
- JavaScript insertRow()JavaScript
- JavaScript isPrototypeOf()JavaScript