surffishin07 surffishin07
  • 17-11-2019
  • Computers and Technology
contestada

Which of the following is a valid JavaSript statement?
a. If (x = 5) x == 2 * x;
b. if (x = 5) x =2* x;
c. if (x == 5) x == 2 * x;
d. if (x == 5) x = 2 * x;​

Respuesta :

wyskoj
wyskoj wyskoj
  • 17-11-2019

Answer:

D

Explanation:

A and B are not valid because you cannot use "=" as a comparator (you must use "==" or "===").

C is not valid because the expression after the conditional is not a statement (it uses "==" instead of "=")

Answer Link
michaelarmstrong1337 michaelarmstrong1337
  • 18-11-2019

It is D if (x == 5) x = 2 * x;​

Answer Link

Otras preguntas

Question attached below:Thanks! :)
A pitcher's arm rotates at a speed of 7 77 degrees per millisecond ( degrees ms ) ( ms degrees ​ )left parenthesis, start fraction, start text, d, e, g, r,
Read the paragraphs about the social contract theory
solve this equation: K - 8 =15
5x + 6 = 4x - 2What is x?​
Why is it crucial the hunters down a path what could happen if you do not stay on the path a sound of thunder
raise 3 to the 2nd power, then add c to the result
1. A particle is moving along the x-axis. Its position as a function of time is given as x = bt − ct 2 . a) What must be the units of the constants b and c, if
. Every month, there are 1000 independent TIE fighter flights, and each TIE fighter flight crashes with a probability of 0.0035. (a) What is the probability tha
what is the location of pranchyma ​