interesting js
[5/3/2016 4:18 PM] Calos Chen:
function a(b,e){var a=0;a+=b;if(e){console.log(b+e);return;} return function(c){a+=c;console.log(a)}} output: a(2,3) 5
a(2,3) 5
两种写法结果一样 a(2,3)和a(2)(3)
interesting js的更多相关文章
- 【腾讯Bugly干货分享】WebVR如此近-three.js的WebVR示例解析
本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/57c7ff1689a6c9121b1adb16 作者:苏晏烨 关于WebVR 最 ...
- (翻译)《Hands-on Node.js》—— Why?
事出有因 为何选择event loop? Event Loop是一种推进无阻塞I/O(网络.文件或跨进程通讯)的软件模式.传统的阻塞编程也是用一样的方式,通过function来调用I/O.但进程会在该 ...
- You Don't Know JS: Scope & Closures(翻译)
Chapter 1: What is Scope? 第一章:什么是作用域 One of the most fundamental paradigms of nearly all programming ...
- js 性能基准测试工具-告别可能、也许、大概这样更快更省
平时写js经常遇到这样做是不是更快点?但又没有具体简单可测试的工具,最近也倒序看博客园司徒正美 js分类下的文章 [ps:去年灵光一闪,发现看博客园排名前100的博客.按照文章分类倒序看是学习最快的方 ...
- 如何使用impress.js做一个网页版本的PPT
blockquote{font-size: 18px;line-height:1.5;margin:0;}line-height: 1.5; 要做一个网站制作规范培训,之前村长做过一次培训,但是后来一 ...
- Understanding Asynchronous IO With Python 3.4's Asyncio And Node.js
[转自]http://sahandsaba.com/understanding-asyncio-node-js-python-3-4.html Introduction I spent this su ...
- three.js 简介
What is Three.js? Let's try to describe it briefly: Three.js is a library that makes WebGL - 3D in t ...
- JS内存泄漏 和Chrome 内存分析工具简介(摘)
原文地址:http://web.jobbole.com/88463/ JavaScript 中 4 种常见的内存泄露陷阱 原文:Sebastián Peyrott 译文:伯乐在线专栏作者 - AR ...
- 奇怪的JS正则之 /[A-z]/.test("\\"); // true
本文是在一个国外介绍JS的网站上转载过来的,作者很逗,先是举例JS让人XX的例子,再动手实践发现JS隐藏的黑知识.为什么 /[A-z]/.test("\\"); 是 true ,你 ...
随机推荐
- 微信公众账号开发教程(二) 基础框架搭建——转自http://www.cnblogs.com/yank/p/3392394.html
上一章,我们已经初步讲解了微信公众账号开发的基本原理,今天我们来探索设计实现. 首先我们设计了模块层次图,当然图中只是给出一种实现方式,不局限于此.具体见下图. 主要功能介绍如下: 1)请求接口层.处 ...
- php 请求参数限制
公司有个群发短信的小项目,项目上线了很久也没有什么问题,最近有商家说 我短信群发不能用 现象是:发现有时候可以发送,有时候不可以发送,看截图发送的手机数量不一样 通过调试php代码发现 php 只接受 ...
- 用正则验证字符串格式,形如:A)XXX B)XXXX C)XXX
今天遇到个小功能,要验证某个英文选项是否正确,例如:A)accumulate B)circling C)communities D)competition E)domestic F)financi ...
- selenium webdriver
http://www.blogjava.net/qileilove/archive/2014/02/18/409975.html Selenium VS Webdriver Selen ...
- windbg sos版本不匹配问题解决
dumpheap 时提示: 0:105> !dumpheap -stat The garbage collector data structures are not in a valid sta ...
- HBase的完全分布式的搭建与部署,以及多master
一:前提准备 1.设置时间同步 2.清空logs,datas 3.格式化集群 bin/hdfs namenode -format 4.重启集群 sbin/start-dfs.sh sbin/start ...
- 转:php 获取时间今天明天昨天时间戳
<?php echo "今天:".date("Y-m-d")."<br>"; echo "昨天:".d ...
- [LeetCode] Search for a Range(二分法)
Given a sorted array of integers, find the starting and ending position of a given target value. You ...
- Ubuntu deb包使用
deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian Package的简写,是为Debian 专 ...
- Spark Programming--Transformations
map 将RDD中的每个数据项,一对一的映射关系,RDD数目不变,分区数也不变 例子: 数据集: map操作: flatMap 和map一样,但是会拆分每一个map之后的list,可以理解为一对多(注 ...