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
Sergio039 [100]
2 years ago
5

Create an array of 10 fortune cookie sayings that will be randomly displayed each time the user reloads the page. The fortune wi

ll be sayings like: "Procrastination is the thief of time." Let the visitor get a new fortune when a button is clicked. g
Computers and Technology
1 answer:
vfiekz [6]2 years ago
4 0

Answer:

let cookieNumber = Math.floor(Math.random() * 10)

switch (cookieNumber) {

  case 1:

   document.write('Fortune 1')

   break;

  case 2:

   document.write('Fortune 2')

   break;

   case 3:

   document.write('Fortune 3')

   break;

  case 4:

   document.write('Fortune 4')

   break;

  case 5:

   document.write('Fortune 5')

   break;

  case 6:

   document.write('Fortune 6')

   break;

  case 7:

   document.write('Fortune 7')

   break;

  case 8:

   document.write('Fortune 8')

   break;

  case 9:

   document.write('Fortune 9')

   break;

  case 10:

   document.write('Fortune 10')

Explanation:

The cookieNumber is generated using Math.random(), which is rounded to a whole number using Math.floor(). Then, a switch block is used to display a different fortune depending on the value of cookieNumber.

You might be interested in
A _____ stores definitions, such as data types for fields, default values, and validation rules for data in each field.
PIT_PIT [208]
The answer to this question is the term Data Dictionary. A Data Dictionary or also known as metadata repository is a set of information that is stored which contains data, meanings, and values. The data dictionary can be used as a tool for communication between the stakeholders.
5 0
3 years ago
When you use the mvc pattern for a java web application, you often add ________________________ to the request object before you
aivan3 [116]
Hi,

JVM - Java Virtual Machine

Hope this helps.
r3t40
6 0
3 years ago
Match the order in which you should develop a plan:
Advocard [28]

Develop

Present

Approve

Brainliiest please?

4 0
2 years ago
Thegroup of technologies concerned with the capturing, processing and transmissionof information in the digital electronic form
lorasvet [3.4K]

Answer: Telecom engineering

Explanation:

As, the telecom engineering is the process of capturing, processing and transmission of information in the digital form. Basically, it is responsible for transmission of data by converting the analog signal into the digital form by using various optical fiber tools and electronic service system. It is the type electronic data exchanger by which information is transmitted by using cables or wires.

6 0
3 years ago
Which is the most used operating system? A. Windows B.Linux C.Leopard D. DOS
Neko [114]
I think it´s either A. or  B.
7 0
3 years ago
Read 2 more answers
Other questions:
  • _____ is a web application server that provides the ability to connect web servers to multiple data sources.
    9·1 answer
  • Many of the special staff teams require leadership training, which is offered to staff with more than 1 year of service at Camp
    15·1 answer
  • In which step of writing a program does a programmer first use a<br> compiler?<br> documentin
    6·1 answer
  • If your microwave oven is a computer, define its Operating System and User Interface.
    12·1 answer
  • I like to troll what about you
    10·1 answer
  • To discover how many cells in a range contain values that meet a single criterion, use the ___ function
    5·1 answer
  • I used a walmart MoneyCard and now it says its prepaid. Its my dad's card.
    12·1 answer
  • What are 5 good movies like The Breakfast Club or 8 Mile?
    14·2 answers
  • Compare and contrast the leadership and leadership and management style of apple and Samsung ​
    6·1 answer
  • explain the joke, “There are 10 types of people in the world: those who understand binary and those who don’t.”
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!