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
Adele’s mother owns a Daycare and she wants to learn all about this business, to help her mom and own it one day. Which CTSO sho
Gennadij [26K]

Answer:

She should join the Future Business Leaders of America–Phi Beta Lambda

Explanation:

CTSOs are Career and technical student organizations. These organizations are vocational and extracurricular groups based primarily in high schools, colleges and career technological centres, for students in Career and Technical Education. They are important parts of the high school and college programs.

The Future Business Leaders of America–Phi Beta Lambda prepares students to become community-minded business leaders. It provides opportunities to learn career skills and gain leadership experience.

Therefore Adele should pick this CTSO

7 0
3 years ago
Laxmi was not confident that she could learn to program a computer. When she found out that two girls with similar GPA’s in her
Lapatulllka [165]

Answer:

She got motivated to work harder. She did not want to be less smarter that the other girls.

Explanation:

She was shy in the beginning, but then once she heard out the  other girls could do it very well. She then got motivated.

7 0
2 years ago
Suppose that the tuition for a university is $10,000 this year and increases 4% every year. In one year, the tuition will be $10
seropon [69]

Answer:

<em>The programming language is not stated; however, I'll answer using Python programming language (</em><em>Se</em><em>e attachment</em><em> </em><em>for</em><em> </em><em>proper </em><em>for</em><em>mat</em><em>)</em>

tuition = 10000

rate = 0.04

for i in range(1,15):

tuition = tuition + tuition * rate

if i <= 10:

print("Year "+str(i)+" tuition:",end=" ")

print(round(tuition,2))

if i == 14:

print("Tuition 4th year after:",end=" ")

print(round(tuition,2))

Explanation:

<em>The first 2 lines initializes tuition and rate to 10000 and 0.04 respectively</em>

tuition = 10000

rate = 0.04

<em>The next line iterates from year 1 to year 14</em>

for i in range(1,15):

<em>This line calculates the tuition for each year</em>

tuition = tuition + tuition * rate

<em>The next 3 lines prints the tuition for year 1 to year 10</em>

if i <= 10:

print("Year "+str(i)+" tuition:",end=" ")

print(round(tuition,2))

<em>The next 3 lines prints the tuition at the 4th year after year 10 (i.e. year 14)</em>

if i == 14:

print("Tuition 4th year after:",end=" ")

print(round(tuition,2))

7 0
3 years ago
Discuss FOUR challenges that have an impact on domestic tourism
shutvik [7]
Crime rate
unemployment
fluctuations
suspension of terrorism
5 0
3 years ago
I have six nuts and six bolts. Exactly one nut goes with each bolt. The nuts are all different sizes, but it’s hard to compare t
juin [17]

Answer:

Explanation:

In order to arrange the corresponding nuts and bolts in order using quicksort algorithm, we need to first create two arrays , one for nuts and another for bolts namely nutsArr[6] and boltsArr[6]. Now, using one of the bolts as pivot, we can rearrange the nuts in the nuts array such that the nuts on left side of the element chosen (i.e, the ith element indexed as nutArr[i]) are smaller than the nut at ith position and nuts to the right side of nutsArr[i] are larger than the nut at position "I". We implement this strategy recursively to sort the nuts array. The reason that we need to use bolts for sorting nuts is that nuts are not comparable among themselves and bolts are not comparable among themselves(as mentioned in the question)

The pseudocode for the given problem goes as follows:

// method to quick sort the elements in the two arrays

quickSort(nutsArr[start...end], boltsArr[start...end]): if start < end: // choose a nut from nutsArr at random randElement = nutsArr[random(start, end+1)] // partition the boltsArr using the randElement random pivot pivot = partition(boltsArr[start...end], randElement) // partition nutsArr around the bolt at the pivot position partition(nutsArr[start...end], boltsArr[pivot]) // call quickSort by passing first partition quickSort(nutsArr[start...pivot-1], boltsArr[start...pivot-1]) // call quickSort by passing second partition quickSort(nutsArr[pivot+1...end], boltsArr[pivot+1...end])

// method to partition the array passed as parameter, it also takes pivot as parameter

partition(character array, integer start, integer end, character pivot)

{

       integer i = start;

loop from j = start to j < end

       {

check if array[j] < pivot

{

swap (array[i],array[j])

               increase i by 1;

           }

 else check if array[j] = pivot

{

               swap (array[end],array[j])

               decrease i by 1;

           }

       }

swap (array[i] , array[end])

       return partition index i;

}

7 0
3 years ago
Other questions:
  • The first character of the VIN designates which of the following? 
    15·2 answers
  • The programs that provide the infrastructure and hardware control necessary for the computer and its peripheral devices are call
    11·1 answer
  • The Internet shopping cart is an example of which version of the web?
    15·1 answer
  • Compute (110110001.01)2 + (27.12)10 + (121.25)16 – (130.20)16 and display the answer in hexadecimal base.
    7·1 answer
  • Explain 3 categories of plagiarism​
    14·2 answers
  • 4. Write technical term for the following statements
    15·2 answers
  • Something I should look for when trying to decide if a source is credible is the publication's ....
    10·1 answer
  • MP3 BrainPoP Quiz
    13·2 answers
  • What does CPU stand for
    7·1 answer
  • Mention any
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!