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
A ________ attack uses software to try thousands of common words sequentially in an attempt to gain unauthorized access to a use
Andrej [43]
Malware
Hope this helps
3 0
3 years ago
What is the main difference between inserting header/footer in excel and word?​
Zepler [3.9K]

Answer:

Header is at the top of the page and used for epicas and titles, while footers at the bottom are used for footnotes or page number

7 0
3 years ago
Wat is a computer risk<br>​
klemol [59]

Answer:

Virus, cyber theft

Explanation:

A computer risk is something that can potentially harm your data on your computer or harm you through a computer by using theft tactics from real people to autonomous viruses making it to your computer and slowing your computer. With cybrrtheft thieves can get personal info through accounts to pictures and payment information.

4 0
3 years ago
Read 2 more answers
In this assignment, you are provided with working code that does the following: 1. You input a sentence (containing no more than
Olegator [25]

Answer:

The code is given below,

import java.io.File;

import java.io.FileInputStream;

import java.util.ArrayList;

import java.util.List;

import java.util.Scanner;

public class SentenceUtilsTest {

public static void main(String[] args) {

List<SentenceUtils> sList = new ArrayList<SentenceUtils>();

try{

File file = new File(args[0]);

Scanner scanner = new Scanner(new FileInputStream(file));

while(scanner.hasNextLine()){

String sent = scanner.nextLine();

if(sent.trim().length() > 0){

SentenceUtils sUtils = new SentenceUtils(sent);

sList.add(sUtils);

}

}

System.out.println("File that was read:" + args[0]);

System.out.println("File contains " + sList.size() + " sentences.\n");

System.out.println("Sentences reports:\n");

for(int line = 0; line < sList.size(); line++){

System.out.println("Sentences " + line +";");

System.out.println(sList.get(line).getSentence());

SentenceUtils lineText = sList.get(line);

String[] tokens = lineText.getTokens();

for(int id = 0; id < tokens.length; id++){

System.out.println(id+":"+tokens[id]);

}

String[] shingles = lineText.getShingles();

for(int id = 0; id < shingles.length; id++){

if(shingles[id] != null){

System.out.print(shingles[id]+" ");

}

}

System.out.println("\n");

}

}catch(Exception ex){

ex.printStackTrace();

}

}

}

package sentenceutils;

import java.util.ArrayList;

import java.util.List;

public class SentenceUtils {

private String sentence;

private String[] tokens;

private String[] shingles;

public SentenceUtils(String s){

this.sentence = s;

generateTokens();

generateShingles();

}

private void generateShingles() {

List<String> shinglesList = new ArrayList<String>();

for (int index=0; index < sentence.length()-1; index++) {

shinglesList.add( sentence.charAt(index) +""+sentence.charAt(index+1) );

}

shingles = new String[sentence.length()];

shinglesList.toArray(shingles);

}

private void generateTokens() {

tokens = sentence.split(" ");

}

public String getSentence() {

return sentence;

}

public String[] getTokens() {

return tokens;

}

public String[] getShingles() {

return shingles;

}

}

4 0
3 years ago
Write code that prints: usernum ... 2 1 blastoff! your code should contain a for loop. print a newline after each number and aft
KATRIN_1 [288]
Here's my source. 
http://cplusplusprogra.blogspot.com/2017/05/453-for-loop-print-n-to-0.html
I've linked you to the answer.
4 0
3 years ago
Other questions:
  • Which of the following is not an algorithm?
    8·1 answer
  • Why is art important to heritage?
    10·1 answer
  • "This command will give you a listing of your basic IP information for the computer you are using"
    6·1 answer
  • Need help with this file and due today!!
    6·1 answer
  • In the borders and shading dialog box where would you look to see if your border will have two sides
    11·2 answers
  • Write qbasic code for given pattern<br><br>NEPAL<br>. EPA<br>. P​
    12·1 answer
  • Question #4
    5·2 answers
  • modified true or false analyze each statement then write technical the statement is true the statement is false underline the wo
    6·1 answer
  • Write a for loop to print the numbers from 20 to 30, inclusive (this means it should include both the 20 and 30). The output sho
    5·1 answer
  • The red dot says ‘you tried to read records from a table called “Netflix Content” but that table doesn’t exist in this’
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!