Network disconnection
Description
함수 solution은 n을 인자로 받아서 1부터 n까지 더한 값을 return하는 함수입니다. 예를들어 solution(3)을 호출하면 1+2+3인 6을 return합니다.
코드 4번째줄과와 코드 5번째줄의 빈칸을 채워 solution을 완성해 보세요.
Fill type challenge HOWTO
- In the Fill type challenge, you have to fill the blank with appropriate code
- The given code except the blank cannot be edited.
- An error message will be shown in the Result area when you leave the blank empty.
1
2
3
4
5
6
7
8
9
function solution(n){
var count = 1;
var sum=0;
while( ){
sum = sum + ;
count++;
}
return sum;
}
Result
Stop
Result of [Run] or [Submit] will be displayed here