Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 718b863

Browse files
Update whoIsPaying.js
1 parent f9b427c commit 718b863

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎whoIsPaying.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
function whoisPaying(names){
12

3+
var names=["ha","hb","hc","hd"];
4+
5+
var randomNumber= names.length;
6+
var randomPosition= (Math.floor( Math.random() * randomNumber)) ;
7+
var randomName=names[randomPosition];
8+
9+
return randomName+" is going to pay the lunch today!" ;
10+
11+
}
12+
13+
var output=whoisPaying();
14+
console.log(output);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /