1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anestetic [448]
4 years ago
14

Which of the following is a valid JavaSript statement?

Computers and Technology
2 answers:
photoshop1234 [79]4 years ago
6 0

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

myrzilka [38]4 years ago
5 0

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 "=")

You might be interested in
APCPS B U10L12 exam (Connexus)
il63 [147K]

I don't know how to that i don't even know how to do my work

7 0
2 years ago
JavaScript
Mekhanik [1.2K]

Answer:

C. 40

Explanation:

The code uses IF and ELSE statements to carry execute a block of code if any of the statements hold true

OrderTotal here is greater than 100, and this allows the second IF ELSE block to be executed.

The code to be executed is discountAmount = OrderTotal * 0.2

This will be discountAmount = 200 *0.2

therefore, discountAmount = 40.

3 0
3 years ago
Choose all that apply.
kirill115 [55]

Answer:

Bullets can be turned off and on.

Lists don't have to use numbers or bullets.

Explanation:

because L just wanted the light

6 0
3 years ago
Read 2 more answers
If you commit retail theft your drivers license will be ? A. Revoked, B. Suspended, C. Cancelled or D. Restricted
Likurg_2 [28]
B.suspended because revoked only happens when it's a felony or reckless,and not cancellations because it would have to be false information.
3 0
3 years ago
Read 2 more answers
Write a program that reads the number of stalls and then prints out diagrams in the format given above when the stalls become fi
Solnce55 [7]

Answer:

/* package whatever; // don't place package name! */

import java.util.*;

import java.lang.*;

import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */

public class Ideone

{

  public static final int STALL_COUNT = 10;

 

public static int find_stall(boolean[] stalls) {

int longest_count = -1;

int longest_length = 0;

int current_count = -1;

int current_length = 0;

boolean inRun = false;

for (int i = 0; i < stalls.length; i++) {

if (inRun && stalls[i]) {

inRun = false;

if (current_length >= longest_length) {

longest_length = current_length;

longest_count = current_count;

}

 

}

else if (!inRun && !stalls[i]) {

inRun = true;

current_count = i;

current_length = 1;

}

else if (inRun && !stalls[i]) {

current_length += 1;

}

}

if (inRun) {

if (current_length >= longest_length) {

longest_length = current_length;

longest_count = current_count;

}

}

return (longest_length - 1) / 2 + longest_count;

}

 

public static void print_pattern(boolean[] stalls) {

for (int i = 0; i < stalls.length; i++) {

if (stalls[i]) {

System.out.print("X ");

}

else {

System.out.print("_ ");

}

}

System.out.println();

}

 

  public static void main (String[] args) throws java.lang.Exception

  {

      boolean[] stalls = new boolean[STALL_COUNT];

for (int i = 0; i < stalls.length; i++) {

stalls[find_stall(stalls)] = true;

print_pattern(stalls);

  }

}

}

3 0
4 years ago
Other questions:
  • Which is true about POP3 and IMAP for incoming email?
    6·1 answer
  • Next, determine if the given number is a prime number. A prime number is a number that has no positive divisors other than 1 and
    11·1 answer
  • To open the format cells dialog box with the alignment sheet active, tap or click the alignment settings ____.
    8·1 answer
  • Which image format is good for compressing large, complex images like photos into smaller file sizes?
    5·1 answer
  • Data-driven decision making is a process of <br><br>    
    7·1 answer
  • Which view is easiest and most recommended for changing the order of the slides? A. Slideshow View B. Slide Sorter View C. Readi
    5·2 answers
  • 4.8 code practice question 1 edhesive
    8·2 answers
  • 100 POINTS!!!!!!!!
    6·2 answers
  • If the cpu is fast but the bus speed is slow, that condition is called?
    15·1 answer
  • There is overlap in the subjects of study in the different information technology disciplines.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!