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]
3 years ago
14

Which of the following is a valid JavaSript statement?

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

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

myrzilka [38]3 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
Write a java program that would request user name, id number, and state the time the user has reported at work.​
Troyanec [42]

Answer:

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.time.LocalDateTime;

import java.time.format.DateTimeFormatter;

import java.util.Date;

import java.util.Scanner;  

public class Main {

   private static final DateFormat dateformat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");

   private static final DateTimeFormatter datetimeformat = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");

   public static void main(String[] args) {

       

       System.out.println("Enter your ID and Name");

       LocalDateTime current = LocalDateTime.now();

       Scanner sc1 = new Scanner(System.in);  

       String Name= sc1.nextLine();

       int ID = sc1.nextInt();

       System.out.println(Name + "reported at:");

      System.out.println(datetimeformat.format(current));

   }

}

Explanation:

The above program saves the current date-time as well, at the time when the user enters his name and ID. And it prints the same on the screen. Further, you can store these in a data structure like list or class or you can store it in a database as well. Remember, this is the difference between a program and a web application, and not to forget we have a toolkit in case of the web application. And here we are working on the console. Also, a web application has a front panel and back panel. However, a program only solves a computing problem, and there is no well-designed interface with the user. However, programming is the root of all other programmings like web programming, mobile app programming, etc.

3 0
3 years ago
Physical activity such as sports or even a brisk walk can help reduce
ycow [4]
Physical activity could help reduce the chance ofheart disease
4 0
3 years ago
Read 2 more answers
Pressing the Backspace key deletes the text to the of the insertion point. The left or the right?
hodyreva [135]

The answer is:

Left

The backspace key only deletes whatever way the point is pointing to. In this case, it is to the left.

Correct me if i'm wrong.  

4 0
3 years ago
Read 2 more answers
What does the headgear of a mine do
deff fn [24]
Hard to answer to short but I will try the head gear let's you talk to people on the internet
5 0
3 years ago
Read 2 more answers
The network of safe houses that assisted runaway enslaved people was known as:.
dedylja [7]

Answer:

The Underground Railroad

Explanation:

4 0
2 years ago
Other questions:
  • April 107 90 29 31 66 0.344
    8·1 answer
  • A method's name and parameter list constitute the method's ____.
    13·1 answer
  • Who would use a CLI? (Command Line Interface)
    9·1 answer
  • А.<br> is the highest education degree available at a community college.
    6·1 answer
  • When you open as many links as you want, and still stay in the same browser window instead of cluttering your screen with multip
    5·1 answer
  • Why was Apple the best company of 2019??
    15·2 answers
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • Why do chloroplasts appear only in plant cells and lysosomes appear only in animal cells?
    13·1 answer
  • Will give 5 star and the mark brainleist
    11·2 answers
  • The ______ Works on a single variable or constant. *​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!