We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messenger.prototype.initListen的方法中有如下代码逻辑: for(var i = 0; i < self.listenFunc.length; i++){ if (prefix + name === self.prefix + self.name) { self.listenFunci; } } 这里可以把if的判断放到外面吗,针对一个回调时,prefix和name是不变的了吧,应该只要判断一次就可以进行for循环了,而现在这种写法是在每次循环时都要判断一次,有什么深意吗?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Messenger.prototype.initListen的方法中有如下代码逻辑:
for(var i = 0; i < self.listenFunc.length; i++){
if (prefix + name === self.prefix + self.name) {
self.listenFunci;
}
}
这里可以把if的判断放到外面吗,针对一个回调时,prefix和name是不变的了吧,应该只要判断一次就可以进行for循环了,而现在这种写法是在每次循环时都要判断一次,有什么深意吗?
The text was updated successfully, but these errors were encountered: