How to clear Cookie data in chrome

Go to chrome://settings/content/cookies. type the domain name in the search box. Click delete. … Press control shift i (or command shift i on OS ... ...

Higher Order Function in Javascript

It is a function to blueprint another functions: //Higher order function function multiplier(n){ return function(base){ return base*n; } } var doubler ... ...

一个简单的例子来使用ES6的Promise

一个简单的例子来使用ES6的Promise object. var p = new Promise(function(resolved,rejected){ var random = Math.floor(Math.random() * Math.floor(2)); console.log(ran ... ...

Merge 2 uneven list with Javascript

var x = [1,3,5,9]; var y = [2,4,6,7,8]; var p1 = 0; var p2 = 0; while(p1 < x.length || p2 < y.length){ if(typeof x[p1] == 'undefined'){ console.log(y[ ... ...

真空的HTML模板

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Title</titl ... ...

用npm安装和设置webpack

安装Webpack npm i webpack webpack-cli -D   设置Webpack 在该文件夹创建文件package.json, 粘贴以下的内容: { "name": "xxxxxx", "version": "1.0.0", "description": "blah b ... ...