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
snow_lady [41]
3 years ago
15

Why do we use console.log in javascript when changing variables?

Computers and Technology
2 answers:
Fiesta28 [93]3 years ago
8 0
It helps to debug the code. Instead of going through every line of code to find an error, using console.log can tell us where to look.
MArishka [77]3 years ago
5 0
This usually helps to debug the code
You might be interested in
Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variable
levacccp [35]

Answer:

if (pH<7.0){

          neutral=0;

          base=0;

          acid=1;

      }

      else if (pH>7.0){

          neutral=0;

          base=1;

          acid=0;

      }

      else if (pH==7.0){

          neutral=1;

          base=0;

          acid=0;

      }

Explanation:

As required by the question, if and else statements have been used to test the value of the pH and assign the apropriate values to the variables neutral, base and acid.

The code snippet below can be used to prompt the user to enter values for pH

<em>import java.util.Scanner;</em>

<em>public class pHTest {</em>

<em>   public static void main(String[] args) {</em>

<em>      Scanner scr = new Scanner(System.in);</em>

<em>       System.out.println("Enter a value for the pH");</em>

<em>       int neutral, base, acid;</em>

<em>       double pH = scr.nextDouble();</em>

<em> if (pH<7.0){</em>

<em>           neutral=0;</em>

<em>           base=0;</em>

<em>           acid=1;</em>

<em>       }</em>

<em>       else if (pH>7.0){</em>

<em>           neutral=0;</em>

<em>           base=1;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>       else if (pH==7.0){</em>

<em>           neutral=1;</em>

<em>           base=0;</em>

<em>           acid=0;</em>

<em>       }</em>

<em>} }</em>

4 0
3 years ago
Read 2 more answers
5-11) (Find the Smallest Value) Write an application that finds the smallest of several integers. Write a program which first as
Elanso [62]

Answer:

import java.util.Arrays;

import java.util.Scanner;

public class num4 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

       System.out.println("How many numbers? ");

       int n = in.nextInt();

       int []intArray = new int[n];

       //Entering the values

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

           System.out.println("Enter the numbers");

           intArray[i]=in.nextInt();

       }

       System.out.println(Arrays.toString(intArray));

       int min =intArray[0];

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

           if(min>intArray[i]){

               min = intArray[i];

           }

       }

       System.out.println("The Minimum of the numbers is "+min);

   }

}

Explanation:

  • Using Java programming language
  • Prompt the user for the number of values
  • Using Scanner class receive and store in a variable
  • Create an array of size n
  • Using an for loop continuously ask the user to enter the integers
  • Print the array of integers
  • Using another for loop with an if statement, find the smallest element in the array of numbers
  • Output the the smallest number
8 0
3 years ago
Ximena noticed that Sofia had created a network bridge on her new laptop between the unsecured wireless network and the organiza
ratelena [41]

Answer:

A bridge could permit access to the secure wired network from the unsecured wireless network

Explanation:

A bridge is connecting device in networking that connects two different network devices. This device is suitable to connect a secure network with an unsecured network.

8 0
3 years ago
Does anyone know how to change there Name of the account that shows up? If you do please tell me in a comment and/or Answer.
Alona [7]

Answer:

change your email

Explanation:

award me brainliest

6 0
3 years ago
Read 2 more answers
Linotype is similar to letterpress since both utilize lead type. The difference is that in a linotype, the type is cast into ful
Maru [420]

Answer:

I think it would be.

A-Metal-cast pouring system

<h2>I hope it helps</h2>

8 0
3 years ago
Other questions:
  • What additive keeps engines clean by preventing contaminates and deposits from collecting on surfaces? a. Friction modifiers b.
    10·2 answers
  • Which output will be displayed by the following program?
    5·2 answers
  • Which tool do you think would be the most useful if you were designing a logo for a business?
    6·2 answers
  • When a formula contains the address of a cell, it is called a(n) ________.
    15·1 answer
  • Do you think I could create a working animatronic like the one from five nights at freddys
    12·2 answers
  • DTE just installed 500kW of solar capacity on the MCCC campus. the cost of the installation was about $3 million. what was the c
    10·1 answer
  • Who created fortnite
    15·2 answers
  • Write the correct statements for the above logic and syntax errors in program below.
    12·1 answer
  • Use the drop-down menus to explain how to locate the Consolidate dialog box.
    6·1 answer
  • Define operating system?explain the types of operating system on the basis of use.​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!