Skip to content

Instantly share code, notes, and snippets.

@lsongdev
Created February 19, 2016 02:59
Show Gist options
  • Save lsongdev/0cdafc3d2d0dda771195 to your computer and use it in GitHub Desktop.
Save lsongdev/0cdafc3d2d0dda771195 to your computer and use it in GitHub Desktop.
var 真 = true;
var 假 = !真;
function 如果(condation, then){
if(condation) then();
return {
否则: function(then){
if(!condation) then();
}
};
}
function 输出(文字){
console.log(文字);
}
//============== EXAMPLE ============
如果(真, () => {
输出('你好');
}).否则(() => {
输出('不好');
});
//============== OUTPUT =============
/*
➜ alias 节点=node
➜ ~ 节点 /用户/桌面/汉字编程.奸商
你好
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment