Reputation: 49
I have a feeling this is really simple but I am having trouble finding any guidance on how to create a "console.log" statement that simply displays the contents of the function instead of executing the function below:
here is the challenge:
Create a console log that displays the contents of the function rather than executing it. For example, your result should be function add20 (num){ return num + 20 }.
Here is the code:
function add20 (num){
return num + 20
}
// CREATE YOUR CONSOLE.LOG BELOW
How can I write a console.log statement to display the contents of the function?
Upvotes: 2
Views: 1850
Reputation: 4097
Just log the function without calling it?
function add20 (num){
return num + 20
}
console.log(add20);
Upvotes: 2