34

其实我们可以少写点if else和switch

 5 years ago
source link: https://juejin.im/post/5c3607b1e51d4503834d3bd2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
前言 作为搬砖在第一线的底层工人,业务场景从来是没有做不到只有想不到的复杂。 不过他强任他强,if-else全搞定,搬就完了。但是随着业务迭代或者项目交接,自己在看自己或者别人的if代码的时候,心情就不再表述了,各自深有体会。所以我们一起看看if还能怎么写 最

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK