Which fix removes the bug?
function add(a, b) {
a + b;
}
- Change
+to* - Rename the function
- Add
returnbeforea + b - Remove the parameters
The function computes the sum but never returns it.
Play Problem Solving ▸
function add(a, b) {
a + b;
}
+ to *return before a + b