Skip to content

Conversation

@yun77op
Copy link

@yun77op yun77op commented Jan 30, 2017

原因是Google Chrome for IOS的相关标示不是chrome,而是CriOS

var _test = ['chrome','maxthon','safari'];
for(var i=0,l=_test.length,_name;i<l;i++){
_name = _test[i]=='safari'?'version':_test[i];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉空行

for(var i=0,l=_test.length,_name;i<l;i++){
_name = _test[i]=='safari'?'version':_test[i];

if (_test[i] === 'safari') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

虽然 === 比 == 好, 但是由于整个框架几本都是用的 ==
所以,为了统一代码风格,还是先用 == 吧,
我也觉得挺无语

@genify
Copy link
Owner

genify commented Mar 1, 2017

收到,非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants