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
ra1l [238]
3 years ago
13

Write JavaScript code to declare a variable of the name favoriteColor

Computers and Technology
1 answer:
Zinaida [17]3 years ago
8 0

Answer:

Variables are used to store values (name = "John") or expressions (sum = x + y).

Declare Variables in JavaScript

Before using a variable, you first need to declare it. You have to use the keyword var to declare a variable like this:

var name;

Assign a Value to the Variable

You can assign a value to the variable either while declaring the variable or after declaring the variable.

var name = "John";

OR

var name;

name = "John";

Explanation:

thats what i found sorry if it wrong

:D

You might be interested in
7.8.1: Function pass by reference: Transforming coordinates. Define a function CoordTransform() that transforms the function's f
Lilit [14]

Answer:

Here is the CoordTransform() function:              

void CoordTransform(int xVal, int yVal, int &xValNew, int &yValNew){

xValNew = (xVal + 1) * 2;

yValNew = (yVal + 1) * 2; }

The above method has four parameters xVal  and yVal that are used as input parameters and xValNew yValNew as output parameters. This function returns void and transforms its first two input parameters xVal and yVal into two output parameters xValNew and yValNew according to the formula: new = (old + 1) *

Here new variables are xValNew  and yValNew and old is represented by xVal and yVal.

Here the variables xValNew and yValNew are passed by reference which means any change made to these variables will be reflected in main(). Whereas variables xVal and yVal are passed by value.

Explanation:

Here is the complete program:

#include <iostream>

using namespace std;

void CoordTransform(int xVal, int yVal, int &xValNew, int &yValNew){

xValNew = (xVal + 1) * 2;

yValNew = (yVal + 1) * 2;}

int main()

{ int xValNew;

int yValNew;

int xValUser;

int yValUser;

cin >> xValUser;

cin >> yValUser;

CoordTransform(xValUser, yValUser, xValNew, yValNew);

cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl;

return 0; }

The output is given in the attached screenshot   

7 0
3 years ago
A python programmer is writing a function definition. What syntax should be used?
Kay [80]

Answer:

<u>Syntax of function in the Python Programming Language.</u>

def function_name():

   '''body of the function or code'''

#calling of the function

function_name()

Note: In Python Programming Language, Indentation is sensitive if you not focus on the indentation then, you program occurs an indentation error.

Explanation:

In Python Programming language, we can use the "def" keyword to define a function then we write the name of the function and then use parentheses for the argument list. "#" is used for the single-line comment and " ''' ''' " is used for the multiple line comment.

A function is the part or module of the program which provides users the feature of reusability of that code anywhere only by calling them.

8 0
3 years ago
((11111111-1011100) X (10100 / 10))- ( 110010000+ 1110011)
dsp73

Answer:

10089891099

Explanation:

?

3 0
3 years ago
What did early computers use to store each bit?
Damm [24]

Answer:

A vacuum tube

4 0
3 years ago
Read 2 more answers
What language is used to write software that instructs computers to take certain actions?
EleoNora [17]

Answer:

C Programming language.

Explanation:

  • A scripting language is a type of programming language, so D cannot be correct.
  • A markup language is a way to edit documents, so A cannot be correct.
  • An indexed language refers to linguistics and is thus irrelevant.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Hit and Slopes Program: A Write a program that can be used by a ski resort to keep track if local snow conditions for one week.
    15·1 answer
  • 4. An outline is most like which of the following? (1 point)
    14·1 answer
  • Direct Mapped Cache. Memory is byte addressable. Fill in the missing fields based upon the properties of a direct-mapped cache.
    6·1 answer
  • Match the items with their respective descriptions.
    6·2 answers
  • 3. Which of the following is called address operator?<br> a)*<br> b) &amp;<br> c).<br> d) %
    12·1 answer
  • A corporate or government network that uses Internet tools, such as Web browsers, and
    13·1 answer
  • What is the definition of bug?​
    11·1 answer
  • During system testing, developers test the program in an environment that is very similar to how the program will eventually be
    11·2 answers
  • Question #3
    15·2 answers
  • The iso 14001:2004 standards require documentation of a firm's environmental program. Which component requires a plan to improve
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!