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
andrew11 [14]
3 years ago
5

If the price of the car is less than or equal to your available cash, display "no". If the price of the car is more than your av

ailable, cash, display "yes".
Engineering
1 answer:
Ede4ka [16]3 years ago
7 0

Answer:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

Explanation:

using functions in Javascript:

functions; this refers to dividing codes into reusable parts.

e.g function function_name() {

console.log("How are you?");

}

you can call or invoke this function by using its name followed by parenthesis, like this: function_name(). each time the function is called it will   print out "How are you?".

Parameters: these are variables that act as placeholders for the values that are to be input into a function when it is called

Arguments: The actual values that input or passed into a function when it is called.

e.g

function function_name(parameter1, parameter2) {

console.log(parameter1, parameter2);

}

then we call function_name: function_name("please", "leave"):we have passed two arguments, "please"  and "leave". Inside the function parameter1 equals "please" while parameter2 equals "leave".

Hence, from the question given the two parameters "car_price" and "available_cash" respectively, we write the function with name function_name:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

You might be interested in
Come and look on my attachment​
CaHeK987 [17]

Crazy Guy what do uh mean ?

4 0
3 years ago
What is the rated power output in ( kw) of a 8 pole motor designed to an IEC 180L motor frame ?<br>​
ra1l [238]

Answer:

P=11 kW

Explanation:

Given that

Number of poles= 8

I.E.C. 180L motor frame

From data book , for 8 poles motor at 50 Hz

Speed = 730 rpm

Power factor = 0.75

Efficiency at 100 % load= 89.3 %

Efficiency at 50 % load= 89.1 %

Output power = 11 kW

Therefore the rated output power of 8 poles motor will be 11 kW. Thus the answer will be 11 kW.

P=11 kW

4 0
3 years ago
Which is an example of a passive solar energy system
Dafna1 [17]
Stone or concrete contraptions
5 0
3 years ago
Which of the following is a markup language that describes data based on a
Sholpan [36]

Answer:

D. XML

Explanation:

8 0
3 years ago
Read 2 more answers
calculate how much black eyes seeds are necessary to plant a 6- hectare( 14.425 acres) field. given that the weight of 1000 blac
11111nata11111 [884]

Answer: 1.38g

Explanation:

Width of planting area = 100m

Field size = 6-hectares(14.425 acres)

Weight of 1000 black eye seed = 230g

1 lb = 453.4g

1 black eye seed = 230g/1000 = 0.23g = 0.00023kg

1 hectare = 10,000sq metre

6 hectare = 60,000sq metre

(Weight/Area) kg/m2

0.00023kg / 10,000 = 2.3×10^-8kg/m^2

And field size = 6hectares = 60,000m^2

(2.3×10^-8) × 60,000 = 0.00138kg of black eye seed

0.00138kg × 1000 = 1.38g

6 0
3 years ago
Other questions:
  • Plot the function for . Notice that the function has two vertical asymptotes. Plot the function by dividing the domain of x into
    5·1 answer
  • Nitrogen can be liquefied using a Joule-Thomson expansioni process. This is done by rapidlyl and adiabatically expandign cold ni
    15·1 answer
  • A pipe leads from a storage tank on the roof of a building to the ground floor. The absolute pressure of the water in the storag
    7·1 answer
  • Shelly cashman word 2016 module 2 - project a pdf - does anyone have the fished paper
    11·1 answer
  • Question 74
    10·1 answer
  • Select the correct answer.
    6·1 answer
  • Why is it better for a CPU to have more than one cache?
    8·1 answer
  • The loneliest people are to kindest
    14·2 answers
  • 8. Block A shown in the figure below weighs 2000 N. The chord attached to A passes over a
    9·1 answer
  • You guys want to talk at seven I am free then
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!