diff --git "a/Insung-Jo/level_0/\352\270\200\354\236\220\342\200\205\354\235\264\354\226\264\342\200\205\353\266\231\354\227\254\342\200\205\353\254\270\354\236\220\354\227\264\342\200\205\353\247\214\353\223\244\352\270\260.js" "b/Insung-Jo/level_0/\352\270\200\354\236\220\342\200\205\354\235\264\354\226\264\342\200\205\353\266\231\354\227\254\342\200\205\353\254\270\354\236\220\354\227\264\342\200\205\353\247\214\353\223\244\352\270\260.js" new file mode 100644 index 0000000..45b5587 --- /dev/null +++ "b/Insung-Jo/level_0/\352\270\200\354\236\220\342\200\205\354\235\264\354\226\264\342\200\205\353\266\231\354\227\254\342\200\205\353\254\270\354\236\220\354\227\264\342\200\205\353\247\214\353\223\244\352\270\260.js" @@ -0,0 +1,11 @@ +function solution(my_string, index_list) { + let answer = []; + + for (let i = 0; i < index_list.length; i++) { + let number = index_list[i]; + + answer += my_string[number]; + } + + return answer; +} diff --git "a/Insung-Jo/level_0/\354\240\221\353\221\220\354\202\254\354\235\270\354\247\200\342\200\205\355\231\225\354\235\270\355\225\230\352\270\260.js" "b/Insung-Jo/level_0/\354\240\221\353\221\220\354\202\254\354\235\270\354\247\200\342\200\205\355\231\225\354\235\270\355\225\230\352\270\260.js" new file mode 100644 index 0000000..8f01bcb --- /dev/null +++ "b/Insung-Jo/level_0/\354\240\221\353\221\220\354\202\254\354\235\270\354\247\200\342\200\205\355\231\225\354\235\270\355\225\230\352\270\260.js" @@ -0,0 +1,4 @@ +function solution(my_string, is_prefix) { + if (my_string.startsWith(is_prefix)) return 1; + return 0; +} diff --git "a/Insung-Jo/level_1/\353\254\270\354\236\220\354\227\264\342\200\205\353\202\264\342\200\205p\354\231\200\342\200\205y\354\235\230\342\200\205\352\260\234\354\210\230.js" "b/Insung-Jo/level_1/\353\254\270\354\236\220\354\227\264\342\200\205\353\202\264\342\200\205p\354\231\200\342\200\205y\354\235\230\342\200\205\352\260\234\354\210\230.js" new file mode 100644 index 0000000..935ae66 --- /dev/null +++ "b/Insung-Jo/level_1/\353\254\270\354\236\220\354\227\264\342\200\205\353\202\264\342\200\205p\354\231\200\342\200\205y\354\235\230\342\200\205\352\260\234\354\210\230.js" @@ -0,0 +1,12 @@ +function solution(s) { + const answer = s.toUpperCase().split(""); + let pCount = 0; + let yCount = 0; + + for (const i of answer) { + if (i === "p" || i === "P") pCount++; + if (i === "y" || i === "Y") yCount++; + } + + return pCount === yCount ? true : false; +}