Assignment with a Returned Value

This commit is contained in:
Abhisek Pattnaik
2015-12-26 07:31:34 +05:30
committed by SaintPeter
parent 4c1aa5b2ea
commit 250d92749b

View File

@ -2115,12 +2115,12 @@
"id": "56533eb9ac21ba0edf2244c3",
"title": "Assignment with a Returned Value",
"description": [
"If you'll recall from our discussion of <a href=\"challenges/waypoint-storing-values-with-the-equal-operator\">Storing Values with the Equal Operator</a>, everything to the right of the equal sign is resolved before the value is assigned. This means we can take the return value of a function and assign it to a variable.",
"If you'll recall from our discussion of <a href=\"waypoint-storing-values-with-the-equal-operator\" target=\"_blank\">Storing Values with the Equal Operator</a>, everything to the right of the equal sign is resolved before the value is assigned. This means we can take the return value of a function and assign it to a variable.",
"Assume we have pre-defined a function <code>sum</code> which adds two numbers together, then: ",
"<code>var ourSum = sum(5, 12);</code>",
"will call <code>sum</code>, which returns a value of <code>17</code> and assigns it to <code>ourSum</code>.",
"will call <code>sum</code> function, which returns a value of <code>17</code> and assigns it to <code>ourSum</code> variable.",
"<h4>Instructions</h4>",
"Call <code>process</code> with an argument of <code>7</code> and assign it's return valueto the variable <code>processed</code>."
"Call <code>process</code> function with an argument of <code>7</code> and assign it's return value to the variable <code>processed</code>."
],
"releasedOn": "11/27/2015",
"tests": [
@ -2143,7 +2143,7 @@
""
],
"solutions": [
""
"processed = process(7);"
],
"type": "waypoint",
"challengeType": "1",