Tell us what’s happening:
I honestly dont even understand what I need to be doing here can someone break it down for me in the simplest terms im so confused.
Your code so far
// Example
var changed = 0;
function change(num) {
return (num + 5) / 3;
}
changed = change(10);
// Setup
var processed = 0;
function processArg(num) {
return (num + 3) / 5;
}
// Only change code below this line
var processed = 2;
function processArg(num) {
return (num + 2)
}
// Example
var changed = 0;
function change(num) {
return (num + 5) / 3;
}
changed = change(10);
// Setup
var processed = 0;
function processArg(num) {
return (num + 3) / 5;
}
// Only change code below this line
var processed = 2;
function processArg(num) {
return (num + 2)
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36.
Call the processArg function with an argument of 7 and assign its return value to the variable processed .
and notice the
// Only change code below this line
your setup is a variable named processed with an initial value of 0, and a function named processArg that takes a number as input, and output the result of a matematical operation that add 3 to the number than divide it by 5.
You need to call the function with the required argument and assign the result of that function call to the processed variable
As said, you just need to reassign the processed variable with the return value of the function processArg. The setup might just be confusing you a bit.
variable = functionCall(argument);
Simple example:
let tagged = '';
function tag(action) {
return action;
}
tagged = tag("You're it")
console.log(tagged);
// You're it
tagged = tag("Not it");
console.log(tagged);
// Not it