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]
2 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]2 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
What is printed when the following code has been executed?
serg [7]
Hey it is 15 hope this helps
3 0
3 years ago
Which are the best examples of cost that should be considered when creating a project budget
sashaice [31]

Explanation:

how much the project will cost

5 0
3 years ago
What is the purpose of the GETPIVOTDATA function?
Mrac [35]

Answer:to export the PivotTable data into another worksheet

Explanation:hope this helps :D

7 0
2 years ago
Read 2 more answers
To move an icon, you right-click it and select “Pin to start menu.” True False
tester [92]

"To move an icon, you right-click it and select “Pin to start menu.” True False"

False

4 0
2 years ago
Read 2 more answers
Matthew is working to select an authentication method for his company that will support REST as well as many web-based and mobil
vitfil [10]

Answer:

C) OpenID Connect

Explanation:

The best option is OpenID Connect because is based in OAuth, and supports multiple web based and mobile clients, and supports REST.

With OAuth, we cannot make any user authentication just provide a token to access data.

RADIUS is a networking protocol, and Shibboleth is a single sign-on log-in system for computer networks and the Internet, both not support REST.

6 0
2 years ago
Other questions:
  • Which of these statements is true?
    9·1 answer
  • You can apply several different worksheet themes from which tab?
    11·2 answers
  • Can somebody help me?
    11·1 answer
  • So I was wondering how I should get into Game Development?
    12·1 answer
  • Technician A says that the ECT and IAT sensors can be tested by using a digital multimeter or a scan tool. Technician B says tha
    12·1 answer
  • Communication is the transmission of messages to large audiences.
    14·1 answer
  • Complete the add repair method!<br> (Will give the brainiest)
    11·1 answer
  • which of the following can be represented by a sequence of bits. 1. An integer 2. An alphanumeric character 3. A machine languag
    12·1 answer
  • I WILL MARK BRAINLEST FOR THIS!!!
    10·1 answer
  • Electronic résumés have an attractive, highly formatted appearance. please select the best answer from the choices provided t f
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!