Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the symbol in javascript

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will analyze "what symbols are in javascript". The content is detailed and easy to understand. Friends who are interested in "what is the symbol in javascript" can read it slowly and deeply with the editor's train of thought. I hope it will be helpful to you after reading. Let's follow the editor to learn more about "what symbols are in javascript".

In JavaScript, the operation symbol is "& &" and "and", which means logical "and". When both expressions before and after the operator are true, the operator "& &" returns true, otherwise it returns false.

The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.

Which symbol is in javascript?

"Logic and" is equivalent to "and" in life, that is, when the two conditions are established at the same time, the operation result of "logic and" is "true". So we use "& &" in JavaScript.

Logic operators are used to determine the logic between variables or values.

Javascript comparison

If both expressions are true, the AND operator (& &) returns true, otherwise false

The symbol is "&". Only if both operands are true, the result is true. Logic and operations are short-circuit operations, and if the first Operand can determine the result, then the second Operand will not be evaluated. For logic and operations, if the first Operand is false, no matter what the second Operand is, the result cannot be true, equivalent to a short circuit to the right.

Examples are as follows:

JavaScript comparison

If both expressions are true, the AND operator (& &) returns true, otherwise it returns false.

Var x = 6 demo var y = 3 scape document.getElementById ("demo") [xss_clean] = (x

< 10 && y >

1) + "

"+ (x < 10 & & y < 1)

Output result:

What is JavaScript JS is the abbreviation of JavaScript, it is a literal scripting language, its interpreter is called JavaScript engine, is a part of the browser, mainly used for web development, can add a variety of dynamic effects to the website, make the web page more beautiful.

This is the end of what symbols are shared in javascript. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report