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
Ymorist [56]
3 years ago
6

How do you return a value from a function?

Computers and Technology
1 answer:
rjkz [21]3 years ago
4 0

Answer:

return instruction used to return a value from a function.

Explanation:

Function is a block of statement which perform the special task.

Syntax for define a function:

type name(parameter_1, parameter_2,...)

{

  statement;

return variable;

}

In the syntax, type define the return type of the function. It can be int, float, double and also array as well. Function can return the array as well.

return is the instruction which is used to return the value or can use as a termination of function.

For return the value, we can use variable name which store the value or use direct value.

You might be interested in
You can use a minus sign to make a negative numberlike -2. What happens to each of the following 2++2
Nostrana [21]
2 - -2 = 4
2 + -2 = 0
2 - +2 = 0
:)
6 0
2 years ago
Rainfall_mi is a string that contains the average number of inches of rainfall in Michigan for every month (in inches) with ever
const2013 [10]

Answer:

Hi!

The answer in Javascript is:

function monthsWithMoreOfThree() {

  var Rainfall_mi = '3,4,1,5,2,6,7,9'; <em>//Defined and declared</em>

  var num_rainy_months = 0;

  var values = Rainfall_mi.split(","); <em>//use split method for Strings. Array is returned</em>

   for (var i = 0; i < values.length; i++) { <em>//for each value, compares with 3</em>

     if(values[i] > 3) { <em>//In Javascript, you can compare an String value with an int. Can use parseInt(aString) to explicit parse but is not necessary</em>

       num_rainy_months++; <em>//If value is greater than 3, adds 1 to num_rainy_months</em>

     }

   }

}

5 0
2 years ago
If 10 ft lb of torque is applied at gear A, then what is the output torque at gear D?
Mrrafil [7]
This is actually simple math.
Use the formula of Gear A/Torque > 12.8ft/lb/10 > 1.28.
Therefor the output torque is 1.28 for gear D.
6 0
3 years ago
Kendra needs to configure a visual alert for an appointment that she is creating for next week. What should she configure?
sergiy2304 [10]
Reminder
To alert her
4 0
3 years ago
Alexis received paychecks from both her jobs and she would like to deposit them. One check is for $62.88 and the other is $523.2
Karolina [17]

Answer:

something :}

Explanation:

have a good day

8 0
2 years ago
Other questions:
  • I have all the points to level up to virtuoso, but it hasn't yet does anyone know when it will?
    9·1 answer
  • When your friend DaJuan turns on his computer, he hears four beeps. The computer won’t fully boot. DaJuan has a Dell computer wi
    7·1 answer
  • Karl comes across confidential information. What should he do with it? A. Manipulate the information in his favor B. Sell the in
    12·1 answer
  • In a systems development life cycle (SDLC) model, the purpose of the _____ is to create a physical model that will satisfy all d
    10·1 answer
  • How many types of sharing of Google Forms are possible?
    15·1 answer
  • 17. Ano ang tawag sa pahina ng Excel?
    12·1 answer
  • What is 3x10? PLZZZZZ
    11·1 answer
  • The Electronic Age began in the<br> A. 1940s<br> B. 1970s<br> C. 1980s<br> D. 1990s
    11·2 answers
  • One limitation of high-level programming languages is
    10·1 answer
  • Paragraph on uses of computer 100 words plss​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!