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

What was the effect of the slave trade in Europe. America, and Africa? (Social, economy, politics)
Find the range of the function
59POINT Drag the labels to the correct locations within the Punnett sqaure.BlackDominant genePhenotypeRecessive geneWhite
A cube has a side length of 5 cm. If this cube is enlarged by a scale factor of 2, What is the enlarged cubes side length. Please show your work.
What is the Integral of 10^ln x dx?
Laura wants the average amount of money she spends each day on her for David Quetion to be no more than $64. On the first three days she spends $71 $62 and $59.
the Age of Enlightenment stressed the importance of blank rather than blank​
How does biodiversity help sustain life on earth?
Why is it important that only one viable egg cell is produced during meiosis in females?
One of the key advantages of buying fitness equipment is ______. A. Privacy B. Flexibility C. Maintenance D. Choice