96.1k views
1 vote
What symbol represents “and” in JavaScript???

2 Answers

7 votes

Answer:

&& ( not &)

Yeah, your question is good.

Usually they insert '&&' code in 'if () { };' code.

User Nir Kornfeld
by
6.1k points
2 votes

Answer:

&& represent "and" in Javascript. Hence, if you want to make use of and in Javascript then you need to make use of && operator, as this in Javascript means and.

As an example:

if (a && b) {

// code to be executed

}

Above if a and b are equal then the code will be executed or else part will be executed.

Step-by-step explanation:

Please check the answer section.

User Christian Vielma
by
6.5k points