๐Ÿค ์€์ง€log ๐Ÿค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋‘ ์ˆ˜์˜ ํ•ฉ ๋ณธ๋ฌธ

๐ŸŒˆ ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋‘ ์ˆ˜์˜ ํ•ฉ

Eun_zii 2022. 11. 15. 10:29

ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv.0

- ๋‘ ์ˆ˜์˜ ํ•ฉ

 

๐Ÿ’š ๋ฌธ์ œ์„ค๋ช…

  • ์ •์ˆ˜ num1๊ณผ num2๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ, num1๊ณผ num2์˜ ํ•ฉ์„ returnํ•˜๋„๋ก soltuion ํ•จ์ˆ˜๋ฅผ ์™„์„ฑํ•ด์ฃผ์„ธ์š”.

 

๐Ÿ’š ์ œํ•œ ์กฐ๊ฑด

  • -50,000 ≤ num1 ≤ 50,000
  • -50,000 ≤ num2 ≤ 50,000

 

๐Ÿ’š ๋ฌธ์ œ

function solution(num1, num2) {
    var answer = -1;
    return answer;
}

 

 

๐Ÿ’š ํ’€์ด

function solution(num1, num2) {
    return num1+num2;
}

 

 

 

728x90