+ 1

How do you write a function?

My code - function game() { alert("hello"); };

31st Dec 2016, 7:10 PM
kelogames
kelogames - avatar
6 Respostas
+ 8
function game() { alert("hello");} game();
31st Dec 2016, 7:29 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
function Message(message){ alert(message); } Message("2017");
1st Jan 2017, 10:38 AM
afgprogrammer
afgprogrammer - avatar
+ 2
You had already written a function, all ValentinHacker showed you is how to call it.
31st Dec 2016, 9:51 PM
Dao
Dao - avatar
+ 1
Thank you
31st Dec 2016, 7:44 PM
kelogames
kelogames - avatar
+ 1
function hi(){ alert('I am a function'); } hi();
30th Jan 2017, 5:18 PM
John Watson
John Watson - avatar
+ 1
function my fun(){ alert("wrong pattern!");}
17th Feb 2017, 4:11 PM
Rampal Bhil
Rampal Bhil - avatar