Lesson 7 javascript


// Parameter is a number, and we do math with that parameter
var timesTwo = function(number) {
return number * 2;

// Call timesTwo here!
var newNumber =function timesTwo(pop){

please tell me error in it..how to make this correct ?


Step 1. You need to create function that do math with parameter. And it's done correctly.
Step 2. Now you need to call your function created in step 1 like this:

var newNumber = timesTwo(6);


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.