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

The main body of the research paper is best written after writing the introduction. True False
decrease 28 by 7% immmmmmmmmm soooooooo stuck
The United States fought in World War II to defeat dictators and preserve democracy. In this fight to defend democracy, however, the United States denied democr
Linda had an orange ribbon and a blue ribbon. The orange ribbon was 2 meters long. The blue ribbon was 4/5 as long as the orange ribbon. Linda cut off a piece o
Suppose P(not E) =65%. Find P (E)
What is the value of x? Here is the picture.
Please help! The guidelines for a healthy adult are to maintain a Body Mass Index (BMI) between 19.5 and 24.9. A formula that relates the height of an adult to
the sum of 3 decimal numbers is 6. Exactly one of the numbers is less than 1 what could those numbers be.
Emilio paid $287.50 in taxes to the school district that he lives in this year. This year’s taxes were a 15% increase from last year. What did Emilio pay in sch
is 2/5 bigger than 40/ 100