Your first function
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
Your first function
Up to now you printed things. A function is a small machine: you give it an input and it returns an answer. You write the inside; the checker tries it with several inputs.
return hands the answer back. Complete double so it returns n times two.
Write a function. Complete double(n) so it returns n times two.
Click Run to see the output here.