Home
Tracks
Reset
Help
Theebug — Learn JavaScript by Doing
Light
Explorer
···
▼
THEEBUG
lesson1.js
lesson2.js
lesson3.js
lesson4.js
lesson5.js
lesson6.js
lesson7.js
lesson8.js
lesson9.js
lesson10.js
lesson11.js
Completed
0/11
Score
0
JS
lesson2.js
×
THEEBUG
›
lesson2.js
1
function
add
(
a
,
b
)
{
2
return
______
;
3
}
4
5
let
result
=
add
(
3
,
7
)
;
6
console
.
log
(
result
)
;
// 10
TERMINAL
PROBLEMS
OUTPUT
DEBUG CONSOLE
⊕
⋮
$
[system] Theebug ready. Happy coding!
Code Blocks
Drag blocks into the drop zones above
4 blocks available
a
+
b
a
-
b
a
*
b
a
/
b
Game Panel
0:00
0 pts
Level 2 of 11
Functions
0/1 slots correct
Objective
Complete the "add" function so it returns the sum of a and b (should output 10)
Expected Output
10
Debug says:
This function should ADD two numbers together! Drag the expression that represents their sum into the return slot. What operation combines two values?
Debug the Worm