随笔分类 -  Javascript

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 31 下一页
摘要:1. Use a for loop to traverse the videos and bookmarks array at the same time. For each video and bookmark pair, create a {videoId, bookmarkId} pair a 阅读全文
posted @ 2016-06-27 16:31 Zhentiw 阅读(226) 评论(0) 推荐(0)
摘要:Three ways to make object immutable: 1. Use JSON.parse(JSON.stringify(obj)): this approach is little bit expense. 2. Use Object.create() This is a che 阅读全文
posted @ 2016-06-27 16:06 Zhentiw 阅读(306) 评论(0) 推荐(0)
摘要:concatAll: Exercise 12: Retrieve id, title, and a 150x200 box art url for every video You've managed to flatten a tree that's two levels deep, let's t 阅读全文
posted @ 2016-06-26 22:46 Zhentiw 阅读(406) 评论(0) 推荐(0)
摘要:fetch() does the same thing as XHR, but fetch return a promise. Check the reponse API here: Link Besides text(), you can use json() or blob(). 'no-cor 阅读全文
posted @ 2016-06-25 21:06 Zhentiw 阅读(371) 评论(0) 推荐(0)
摘要:You can fine tune several webpack plugins to make your bundle as small as it can be for your specific application. However there are a few things you 阅读全文
posted @ 2016-06-25 01:51 Zhentiw 阅读(274) 评论(0) 推荐(0)
摘要:When you have a dependency that does not export itself properly, you can use the exports-loader to force it to export the pieces of the file that you 阅读全文
posted @ 2016-06-25 01:22 Zhentiw 阅读(263) 评论(0) 推荐(0)
摘要:If you have a multi-page application (as opposed to a single page app), you’re likely sharing modules between these pages. By chunking these common mo 阅读全文
posted @ 2016-06-23 01:59 Zhentiw 阅读(254) 评论(0) 推荐(0)
摘要:Often, you have dependencies which you rarely change. In these cases, you can leverage the CommonsChunkPlugin to automatically put these modules in a 阅读全文
posted @ 2016-06-23 01:12 Zhentiw 阅读(316) 评论(0) 推荐(0)
摘要:Leveraging the browser cache is an important part of page load performance. A great way to utilize this cache is by versioning your resources. In this 阅读全文
posted @ 2016-06-22 21:45 Zhentiw 阅读(238) 评论(0) 推荐(0)
摘要:As a Single Page Application grows in size, the size of the payload can become a real problem for performance. In this lesson, learn how to leverage c 阅读全文
posted @ 2016-06-22 21:16 Zhentiw 阅读(194) 评论(0) 推荐(0)
摘要:If you're going to use code splitting with Webpack 2, you'll need to make sure the browser has support for the ES6 Promise API. This means that if you 阅读全文
posted @ 2016-06-22 20:50 Zhentiw 阅读(426) 评论(0) 推荐(0)
摘要:The less code you can send to the browser, the better. The concept of tree shaking basically says that if you’re not using some piece of code, then ex 阅读全文
posted @ 2016-06-22 04:15 Zhentiw 阅读(268) 评论(0) 推荐(0)
摘要:It’s quite common to make a mistake while developing your webpack configuration. A simple typo can cost you hours of development time. With webpack-va 阅读全文
posted @ 2016-06-22 03:51 Zhentiw 阅读(284) 评论(0) 推荐(0)
摘要:There are several lessons that will build on top of this project. It is a fairly standard, small webpack bundled project. In this lesson we’ll explore 阅读全文
posted @ 2016-06-19 02:06 Zhentiw 阅读(276) 评论(0) 推荐(0)
摘要:slice filter map ...spread concat Object.assign 阅读全文
posted @ 2016-06-16 04:35 Zhentiw 阅读(186) 评论(0) 推荐(0)
摘要:delete keyword doesn't actually delete the value but just the reference. So here, what actually delete is the point of me.name: So the point from 'anm 阅读全文
posted @ 2016-06-14 20:17 Zhentiw 阅读(188) 评论(0) 推荐(0)
摘要:First, what is 'High Order function', basic just a function, inside the function return another fuction. For example: Decorators is a subset of high o 阅读全文
posted @ 2016-06-14 03:10 Zhentiw 阅读(389) 评论(0) 推荐(0)
摘要:new.target is a new “magical” value available in all functions, thoughin normal functions it will always be undefined. In any constructor,new.target a 阅读全文
posted @ 2016-06-13 20:50 Zhentiw 阅读(126) 评论(0) 推荐(0)
摘要:Each function should have a 'name' property. It can be anonymous, empty, the same as function name, or class name. For example: 阅读全文
posted @ 2016-06-13 17:24 Zhentiw 阅读(139) 评论(0) 推荐(0)
摘要:Learn how to use console.table to render arrays and objects in a tabular format for easy scanning over the values. We'll create some mock data and the 阅读全文
posted @ 2016-05-17 21:21 Zhentiw 阅读(191) 评论(0) 推荐(0)

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 31 下一页