admin管理员组文章数量:1193972
This example .html has following code:
function run() {
e.animate({along: 1}, 2e4, function () {
e.attr({along: 0});
setTimeout(run);
});
}
What means "2e4" in this example and how it works?
This example http://raphaeljs.com/gear.html has following code:
function run() {
e.animate({along: 1}, 2e4, function () {
e.attr({along: 0});
setTimeout(run);
});
}
What means "2e4" in this example and how it works?
Share Improve this question asked Apr 25, 2013 at 7:56 EvolEvol 1131 gold badge1 silver badge5 bronze badges 1 |2 Answers
Reset to default 21it means 2*10^4
and try it in your console 2e4
the output will be 20000
the e
is the scientific notation
the code is equivilant to
...
e.animate({along: 1}, 20000, function () { ....
2e4
is scientific notation for 2 * 10^4
, and therefore has the same value as 20000.
本文标签: javascriptWhat means 392e439 in codeStack Overflow
版权声明:本文标题:javascript - What means '2e4' in code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738409457a2085234.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
0x
, it's not hexadecimal. – David Titarenco Commented Apr 25, 2013 at 8:01