JavaScript JavaScript Basics Creating Reusable Code with Functions Review: Giving Information to Functions

What line of code will call the function and pass 12 to it?

Thank you.

Tushar Singh
Tushar Singh
Pro Student 8,692 Points
function getRandom( upper ) {
   return Math.floor(Math.random() * upper) + 1;
}

getRandom(12);  // Just call the function and pass 12 to it.

1 Answer

getRandom(12)