[JavaScript #02] Functions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // Greeting function function greeting(name, time) { console.log('Good ' + time + ', ' + name + '!'); } // Calculating cube function function cube{number) { return number * number * number; } //executing greeting function greeting('John', 'Morning'); //prints out "Good Morning, John!"
//executing cube function console.log(cube(2)); /.....
원문 링크 : [JavaScript #02] Functions