Home > Web Front-end > JS Tutorial > A debugging problem caused by JS semicolon_javascript skills

A debugging problem caused by JS semicolon_javascript skills

WBOY
Release: 2016-05-16 18:51:35
Original
954 people have browsed it

Look at the following code:
var a=textbox1.text;
var b=5;
if(a{
a=b;
}
Look at the effect after execution. No matter what the value of textbox1.text is, the condition will be judged. Why? Have you found anything?
It turns out that when I was writing the code, there was an extra semicolon here in if(aNote: What I just wrote down, When I opened it again, there was no content. So I simplified it a bit. I wrote a general meaning

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template