[READ-ONLY] Mirror of https://github.com/shuuji3/javascript-info-playground.
0

Configure Feed

Select the types of activity you want to include in your feed.

javascript-info-playground / function-basics.es6
262 B 15 lines
1function min(a, b) { 2 return (a < b) ? a : b; 3} 4 5function pow(x, y) { 6 let result = 1; 7 for (let i = 0; i < y; i++) { 8 result *= x; 9 } 10 return result; 11} 12 13const x = prompt('x?'); 14const y = prompt('y?'); 15alert(`${x} ** ${y} = ${pow(x, y)}`);