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
a vertical cylindrical container is being cooled in ambient air at 25 °C with no air circulation. if the initial temperature of
Sloan [31]

Answer:

the surface heat-transfer coefficient due to natural convection during the initial cooling period.  = 4.93 w/m²k

Explanation:

check attachement for answer explanation

7 0
3 years ago
Read 2 more answers
Which battery produces more volts per cell, maintenance type or maintenance free ?
Sonja [21]
Double aa battery. It’s is a very high bolted battery that can power up a lot of things
7 0
3 years ago
Mining is an example of this type of business
luda_lava [24]

Answer:

Mining would go under Industry organization.

5 0
3 years ago
If there’s an unidentified puddle under your car, it means ______.
algol13
Someone dropped a gallon of milk and you parked over it
6 0
4 years ago
Driving alone without the distraction from passengers reduces the risks you face in driving.
vredina [299]

Driving alone without the distraction from passengers reduces the risks you face in driving.

True

3 0
2 years ago
Other questions:
  • Four race cars are traveling on a 2.5-mile tri-oval track. The four cars are traveling at constant speeds of 195 mi/h, 190 mi/h,
    15·1 answer
  • Do Solar panels produce energy when Artificial light shines on them?
    10·1 answer
  • The steady-state data listed below are claimed for a power cycle operating between hot and cold reservoirs at 1200 K and 400 K,
    6·2 answers
  • If a vacuum gau ge reads 9.62 psi, it means that: a. the very highest column of mercury it could support would be 19.58 inches.
    11·1 answer
  • 13. Write a function which is passed two strings. The function creates a new string from the two original strings by copying one
    13·1 answer
  • A 4140 steel shaft, heat-treated to a minimum yield strength of 100 ksi, has a diameter of 1 7/16 in. The shaft rotates at 600 r
    13·2 answers
  • At steady state, a valve and steam turbine operate in series. The steam flowing through the valve undergoes a throttling process
    9·1 answer
  • A wood pole with a diameter of 10 in. has a moisture content of 5%. The fiber saturation point (FSP) for this wood is 30%. The w
    9·1 answer
  • For this problem, calculate the following by hand and show the procedure for how you obtained the results. Subsequently, solve p
    10·1 answer
  • IDENTIFY THE POINTER READING FOR EACH SCALE. COMPUTE THE READING USING THE ASSIGNED RANGE MULTIPLIER FOR OHMMETER SCALE.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!