摘要: For example, we have a 2D arrays; We want to sort by the number first, if the number are the same, then we want to sort by name DESC: So the result sh 阅读全文
posted @ 2019-12-01 22:46 Zhentiw 阅读(128) 评论(0) 推荐(0)
摘要: function addTo80(n ) { return 80 + n; } function memoizedAddTo80 (fn) { let cache = {}; return (n) => { /*keyword 'in' to check prop exists*/ if (n in cache) { console.log('from cache') return cache[n 阅读全文
posted @ 2019-12-01 17:35 Zhentiw 阅读(112) 评论(0) 推荐(0)