Start learning free

LESSON 39 OF 671 · FUNCTIONS I

Parameters & Arguments: Buggy Code I in JavaScript

Practice

Inside the code editor we've tried to define and call a function that takes a number as argument and prints the double of that number to the console.

So when we ran the code, we expected it to print:

20

but it seems like we made some mistakes because when we run our code we get a ReferenceError instead.


Assignment:

Your task is to fix our code such that no errors will be produced and it will print the desired output.

STEP 1 OF 1
    Ctrl + Enter to check