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
Splunk knows where to break the event, where the time stamp is located and how to automatically create field value pairs using t
schepotkina [342]

Answer:

The answer is "Option a".

Explanation:

Splunk is a software that is used for captures, indexes, and it provides a collection of real-time data. It is also known as a searchable archive that can be used to produce maps, charts, warnings, dashboards, and visualizations. It is a hierarchical system used to handle software, protection, and security, and to analyze enterprise and network. and other options are incorrect that can be described as follows:

  • In option b, It tells the name of the file and it also described the type of file like text file, image file, etc. That's why it is not correct.
  • In option c, This option is used to add data into the new line, that's why it is not correct.

7 0
4 years ago
What is spam? electronic junk mail e-mail abuse e-mail subscriptions the e-mail server the opt out feature unethical use of e-ma
expeople1 [14]

Answer:

electronic junk mail.

Explanation:

7 0
3 years ago
Documents stored on the world wide web are written and linked together using
FrozenT [24]
Using the hypertext transfer protocol
3 0
3 years ago
If you are inserting an address block with the Address Block dialog box and the fields do not connect automatically, what can yo
erica [24]

Answer: B

Explanation:

5 0
4 years ago
Read 2 more answers
Which of the two previously described wing designs should result in a longer flying time?
Archy [21]

Answer:

If it's a bird than the bigger the wing span the faster it can fly... or possibly glide in the air longer. I think all plan wing sizes don't change the effect of how it goes. If it is something like the sky gliders than yes. It would most likely be in the sky longer.

5 0
3 years ago
Other questions:
  • For most applications, saving sound files at the _____ bit resolution provides a good balance of sound quality and file size.
    15·2 answers
  • A computer programme that tells the computer how to perform particular tasks
    8·1 answer
  • Computer security:
    15·1 answer
  • Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19
    11·1 answer
  • A pangram is a sentence that contains all the letters of the English alphabet at least once. For example, the quick brown fox ju
    6·1 answer
  • A folder has been shared with other users and set to read-only. What does this mean for users?
    12·2 answers
  • I need help ASAP please and thank you!
    11·1 answer
  • Which one is not considered part of the cinematography team?
    7·2 answers
  • What allows a programmer to write code quickly and efficiently for an action that must be repeated?
    14·1 answer
  • The type of memory that stores data<br>Currently in used is called​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!