Speech synthesis (experimental) 語音合成(試驗功能) 使用 SpeechSynthesisUtterance.v...
Get days difference between dates (獲取兩個日期間的差距) 計算兩個 Date對象之間的差距(以天為單位)。
Bottom visible (底部可見即滾動至底部) 使用scrollY,scrollHeight和 clientHeight來確定頁面的底部...
Escape regular expression (轉(zhuǎn)義正則表達(dá)式) 使用 replace()去轉(zhuǎn)義特殊字符。 Get native type...
Collatz algorithm (考拉茲算法) 如果 n 是偶數(shù),返回 n/2,否則返回 3n+1。 Distance between tw...
Chain asynchronous functions (鏈?zhǔn)疆惒胶瘮?shù)) 循環(huán)遍歷包含異步事件的函數(shù)數(shù)組,當(dāng)每個異步事件完成時調(diào)用 next。...
Anagrams of string (with duplicates) (字符串異位(和重復(fù))) 使用遞歸。遍歷給定字符串中的每個字母,用其余...
Object from key-value pairs (鍵值對創(chuàng)建對象) 使用Array.reduce()創(chuàng)建和組合鍵值對。 Object t...