Home >Web Front-end >JS Tutorial >Simplified code for javascript if_javascript tips

Simplified code for javascript if_javascript tips

WBOY
WBOYOriginal
2016-05-16 19:06:101219browse

[Ctrl A Select All Note: If you need to introduce external Js, you need to refresh to execute
]

[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]
You can also write like this
[Ctrl A select all Note:
If you need to introduce external Js, you need to refresh to execute
]<script> a=0 if(a<1)alert(a),alert(1-a) //VS if(a==0){alert(a);alert(1-a)} </script><script> a=0 a?0:(alert(a),alert(1-a)) </script><script> a=0 a==0 && (alert(a),alert(1-a)) </script>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn