We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 802e210 + 96e8716 commit 4c1514aCopy full SHA for 4c1514a
Insung-Jo/각도기.js Insung-Jo/level_0/각도기.jsInsung-Jo/각도기.js renamed to Insung-Jo/level_0/각도기.js
Insung-Jo/level_0/문자열 안에 문자열.js
@@ -0,0 +1,6 @@
1
+function solution(str1, str2) {
2
+ if(typeof str1 !== 'string' || typeof str2 !== 'string') throw new Error('문자를 입력해주세요.');
3
+ const result = str1.indexOf(str2) !== -1 ? 1 : 2;
4
+
5
+ return result;
6
+}
Insung-Jo/level_0/짝수의 합.js
@@ -0,0 +1,12 @@
+function solution(n) {
+ if(typeof n !== 'number') throw new Error('정수를 입력해주세요.');
+ if(n <= 1) return 0;
+ let result = 0;
7
+ for(let i = 2; i <= n; i+=2){
8
+ result += i;
9
+ }
10
11
12
0 commit comments