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
AleksAgata [21]
3 years ago
6

Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets

to num_tickets
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
7 0

Solution :

function tickets(user_tickets){

var num_tickets;

if (user_tickets < 5) {

num_tickets = 1;

return ('num_tickets: '+ num_tickets);

}

else {

num_tickets = user_tickets;

 return('num_tickets: '+ num_tickets);

}

}

// Testing the tickets function

// With user_tickets = 3, 5, 8, and 1

console.log(tickets(3));

console.log(tickets(5));

console.log(tickets(8));

console.log(tickets(1));

You might be interested in
All of the following are methods of communication
NNADVOKAT [17]

Answer:

Extremal hard drive is not form of communication.

3 0
3 years ago
Read 2 more answers
There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object o
Aloiza [94]

Answer:

are u in HS or college work

I am trying to understand

6 0
2 years ago
Frank has created a résumé and separated the sections using headings. How can he set the headings apart from normal text?
Pepsi [2]
He could use bold or bigger text just a suggestion.
6 0
3 years ago
Clicking on the sheet tab with the _______ adds another worksheet to an Excel file.
alekssr [168]
Circled plus sign adds another worksheet
7 0
3 years ago
A computer has __________processing device
Artist 52 [7]

Answer:

electronic processing device

4 0
3 years ago
Other questions:
  • Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
    11·1 answer
  • Sue conducted an experiment to determine which paper towel is the most absorbent among three different brands. She decides to pr
    15·1 answer
  • Describe the following software process models using your own words .Your explanation should also provide an example of a softwa
    12·1 answer
  • What character separates the file extension and the filename?
    13·2 answers
  • A(n) is the tool that will help you the most when developing the content you will use in your presentation.
    10·1 answer
  • Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
    7·1 answer
  • What is your favorite anime ( All movies and episodes related to them count )
    8·2 answers
  • What is a computer please tell me ​
    10·2 answers
  • An end-user license agreement protects _____.
    11·1 answer
  • Which of the following was the first computer-animated film to win animated film to win an academy award?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!