Write A function, then call it underneath with the write arguments(the string/boolean/number/float/etc inside the function parenthesis). Then right punctuality inside a function and return the new data.
function addition(number) {
number = number + number
return number
// answer returned is 10
}
addition(5)
Top comments (1)
The code can be shortened to:
Also, its not a good practice to modify the function arguments directly.