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

Can someone help with number 4 please
The price of an item increased by 25%. If the price of the item after the increase is $2, find the original price.a) $1.50, b) $1.60, c) $1.75, d) $2.50, e) $3.
what is a 'cheap shot'?
11 divided by 1/3 (fraction form)
The larger leg of a right triangle is 3cm longer than its smaller leg. The hypotenuse is 6cm longer than the smaller leg. how many centimeters long is the small
how do i write a myth?
Mosaics are constructed from small pieces of stone called what?
Where do plants get the carbon they use to make organic molecules?
1. how will you compare the heart pump model and the human heart? 2. how does the heart function as a pump?
what are adjective clauses?