Home > Web Front-end > JS Tutorial > body text

Several operators in javascript_basic knowledge

WBOY
Release: 2016-05-16 19:11:56
Original
1146 people have browsed it

|| is operated like this: starting from the first one, if it encounters a meaningful return, otherwise it returns the last expression (note that it is not necessarily a Boolean value);

&& is operated like this: starting from the first At the beginning, a meaningless return is encountered, otherwise the last expression is returned (note the same as above);

! is operated like this: negate the value of the expression (note not the expression).

What is meaningless: the following six: 0, null, undefined, "", false, NaN. Otherwise, it makes sense.​

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