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]
3 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]3 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
What is a segment
monitta
A length of uninterrupted cable connecting two devices
3 0
3 years ago
The steps for creating a newsletter are to _____.
lys-0071 [83]
Puting your ideas together every write has to do that and also gather true information, and making a intering story for your readers.
7 0
3 years ago
Read 2 more answers
How do you go about placing a picture in your question?
rodikova [14]

when you are asking your question you can click on the link down at the bottom and when it pops up all your files click the one who want to send

plz mark brainliest lol seemed like an easy question but i need them to rank up so yea lol

6 0
3 years ago
Read 2 more answers
What do you understand by multitasking?Explain cooperativemultitasking ?
Nadusha1986 [10]

Answer: Multitasking is the ability of the operating system by which a processor is able to process multiple task at the same time.

Cooperative multitasking is non preemptive multitasking where the processor is assigned to a single process and does not preempt  until it completes its jobs or moves to a waiting state.

Explanation:

In Multitasking jobs are executed at a faster rate than as many jobs or tasks can be assigned to the processor at the same time.

In cooperative multitasking due to the non preemptive nature a single job could be assigned to the cpu at a time.  

4 0
3 years ago
Read 2 more answers
Please help i will give you brainiest please answer all parts i beg you!!!!!!!!!!!!!!!!11111
leonid [27]

Answer:

“Oh yeeeaah… K. Love you so much. Bye”

I rushed upstairs and woke dad up from his slumber. “Dad! Dad! Jon’s hurt. He’s bleeding. Get up!”

I’m not sure what followed. I imagine Dad rushed down the stairs and wrapped Jon’s knee up in a towel or something. He probably packed us all in to our Red Lumina and rushed Jon off to the hospital twenty minutes away. Jon got stitches. I’m not sure how many. Jon doesn’t even know anymore. All Jon really remembers is the pain.

In the years that passed I began to wonder why we didn’t go upstairs to dad in the first place. Why’d we call mom first?

Through a conversation with my sister, we realized this was our normal. Although Dad was around, he was never present. He was absent so often that in a time of crisis we didn’t even turn to him. As a father, I want to be present.

8 0
3 years ago
Other questions:
  • Which view In a presentation program displays you’re slides in full screen modes ?
    8·2 answers
  • Concept of CPU scheduler?​
    7·1 answer
  • How should you handle possible suicides:
    10·1 answer
  • The machine should not be oiled until the
    11·1 answer
  • Ethereum Mining Calculator Profitability and Difficulty Level?
    13·1 answer
  • A network needs to be set up with 60 subnets. Given the IPv4 class C address 192.168.100.0, what subnet mask value should be use
    7·1 answer
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • What type of version of visual studio is the visual studio express
    8·1 answer
  • How many passes will it take to find the five in this list?
    6·2 answers
  • Im learning about AI in my class and I'm confused about these two questions
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!