touchTimeout&&clearTimeout(touchTimeout)
等价于
if(touchTimeout){
clearTimeout(touchTimeout)
}
本文介绍了一种使用逻辑与操作来清除 JavaScript 定时器的方法,该方法提供了一种简洁的替代 if 语句的方式。
touchTimeout&&clearTimeout(touchTimeout)
等价于
if(touchTimeout){
clearTimeout(touchTimeout)
}
转载于:https://www.cnblogs.com/mabelstyle/archive/2013/03/28/2986888.html
1665
1万+
6125

被折叠的 条评论
为什么被折叠?