How to call a function with a parameter in Javascript

时间:2015-11-12 11:04:10

标签: javascript jquery

I am training in JavaScript on the TeamTreehouse website, I am stuck on a simple fill in the blank question.

function getRandom( upper ) {
 return Math.floor(Math.random() * upper) + 1;
}

The fill in part is

.............;

2 个答案:

答案 0 :(得分:0)

Here you go, its pretty simple:

getRandom(12);

答案 1 :(得分:-1)

getRandom(12)通常您会添加半冒号,但空白填充了该部分。