
Apu
February 11, 2023 ›
#Javascript
›
#Q&A
❌
Which operator is used to assign a value to a variable?
- A) ==
- B) =
- C) +
- D) !=
Answer: B) =
Explanation: the = operator is used to assign a value to a variable. This operator takes a value of the right side of the equation and assigns it to the variable on the left side.
For example, if you want to assign the value 20 to the variable y, you need write y = 20.
Example:
<script> let y = 20; console.log(y); </script>
save
listen
AI Answer
Which operator is used to assign a value to a variable?
0
A) == B) = C) + D) != Answer: B) = Explanation: the = operator is used to assign a value to a …
asked
Apu
0 answers
2915
A) == B) = C) + D) != Answer: B) = Explanation: the = operator is used to assign a value to a …
Answer Link
answered
Apu