随笔分类 -  Javascript

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 30 下一页
只有注册用户登录后才能阅读该文。
posted @ 2019-07-24 02:49 Zhentiw 阅读(1) 评论(0) 推荐(0)
摘要:To see how to call another generator inside a generator: Example: 阅读全文
posted @ 2019-07-23 13:54 Zhentiw 阅读(174) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-07-10 00:04 Zhentiw 阅读(4) 评论(0) 推荐(0)
摘要:There are two ways to correctly type checks number: When using Number.prototype methods, some of them return String as result: We can see this string: 阅读全文
posted @ 2019-06-18 21:19 Zhentiw 阅读(176) 评论(0) 推荐(0)
摘要:const result = Number('55px'); // isNaN "NaN" console.log(isNaN(result)); // true console.log(isNaN('I am a String!')); // true -- NOT Good console.log(Number.NaN); // safer approach console.log(Nu... 阅读全文
posted @ 2019-06-18 21:12 Zhentiw 阅读(238) 评论(0) 推荐(0)
摘要:What's your expect of the output?: The answer is 'false'. Because: Therefore if we do calculation on Frontend: The result is not correct. The solution 阅读全文
posted @ 2019-06-18 21:04 Zhentiw 阅读(176) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-06-05 02:16 Zhentiw 阅读(3) 评论(0) 推荐(0)
摘要:A Proxy allows you to trap what happens when you try to get a property value off of an object and do some behavior before the value is accessed. For e 阅读全文
posted @ 2019-05-31 22:17 Zhentiw 阅读(144) 评论(0) 推荐(0)
摘要:Private variable in class: class field syntax: Previously you need to call 'super' But now, we don't need to, you can use classs field: Above two feat 阅读全文
posted @ 2019-05-10 22:39 Zhentiw 阅读(280) 评论(0) 推荐(0)
摘要:const log = console.log; // zero :: &fa.a const zero = f => x => x; // zero is F // once :: &fa.fa const once = f => x => f(x); // once it I // twice :: &fa.f(fa) const twice = f => x => f(f(x)); //... 阅读全文
posted @ 2019-05-10 14:34 Zhentiw 阅读(228) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-05-08 00:34 Zhentiw 阅读(2) 评论(0) 推荐(0)
摘要:All the tagged function really does is give us a function to fill the given named properties on an object. taggedSum is a combination of multi Typed c 阅读全文
posted @ 2019-04-15 20:39 Zhentiw 阅读(270) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-04-08 01:49 Zhentiw 阅读(7) 评论(0) 推荐(0)
摘要:Sometime you need to check one prop exists on the object and value should not be ´null´ or ´undefined´. One problem people may occur with: Here we mis 阅读全文
posted @ 2019-04-01 15:11 Zhentiw 阅读(147) 评论(0) 推荐(0)
摘要:Imaging we have a deck of cards, eveytimes we need to pick one card from deck, the result we want to have is: For selected, each time we want only one 阅读全文
posted @ 2019-03-27 19:17 Zhentiw 阅读(191) 评论(0) 推荐(0)
摘要:Using Naive JS: The main problem is inside 'rando' function, not really a FP way doing stuff. Arrow approach: It becomes complex with we need to do Pa 阅读全文
posted @ 2019-03-26 17:15 Zhentiw 阅读(250) 评论(0) 推荐(0)
摘要:Recently, I am learning Working with ADT. Got some extra thought about State Monad. Basiclly how to thinking in State. First, we need to know the type 阅读全文
posted @ 2019-03-25 19:06 Zhentiw 阅读(265) 评论(0) 推荐(0)
摘要:In previous post, Arrow Functor with contramap, we have seen how to opreating on params before we invoke the function by using Arrow + contramap. It h 阅读全文
posted @ 2019-03-24 22:06 Zhentiw 阅读(333) 评论(0) 推荐(0)
摘要:This lesson teaches you how arguments passed to a curried function allow us to store data in closure to be reused in our programs and applications. Si 阅读全文
posted @ 2019-03-23 22:10 Zhentiw 阅读(169) 评论(0) 推荐(0)
摘要:To demonstrate the difference between mutability and immutability, imagine taking a drink from a glass of water. If our glass is mutable, when we take 阅读全文
posted @ 2019-03-23 21:58 Zhentiw 阅读(183) 评论(0) 推荐(0)

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 30 下一页