If a function is to return some calculated value on completion, which keyword will you use to do this?
return;
ret;
yield;
function;
Explanation & Hint:
To return a calculated value from a function in JavaScript, you would use the return keyword. The return keyword is used within a function to specify the value that should be returned when the function is called. It allows you to pass back a result or data to the caller of the function. |