gomeplusfed / blog Goto Github PK
View Code? Open in Web Editor NEWblog
blog
调用timer类的remove后,如果quene长度为0,则timer变成停止状态,此后再调用add方法,并没有定时器重启机制,所以不会再运行
delay = first ? delay : ((cost > delay) ? cost - delay : delay);
这里的逻辑不太对吧,cost时间大于delay了,例如cost为3s,初始化的delay值为1s,这里不应该不处理delay么,这样setTimeout(argument.callee, delay),相当于没隔4s执行了一个周期吧。
你这样离delay = cost-delay的原因是?
“第一种写法返回值有bug,小余10的返回的为number类型,一个js的坑。”这里是不是有问题?应该是大于吧
基本实现的第一个例子
document.getElementsById("") => document.getElementById("")
看完后发现自己不会写了怎么破!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.