본문 바로가기

분류 전체보기825

0109. A Needle in the Haystack Can you find the needle in the haystack? Write a function findNeedle() that takes an array full of junk but containing one "needle" After your function finds the needle it should return a message (as a string) that says: "found the needle at position " plus the index it found the needle, so: Example(Input --> Output) ["hay", "junk", "hay", "hay", "moreJunk", "needle", "randomJunk"] --> "found th.. 2023. 1. 9.
0108. How many lightsabers do you own? Inspired by the development team at Vooza, write the function that accepts the name of a programmer, and returns the number of lightsabers owned by that person. The only person who owns lightsabers is Zach, by the way. He owns 18, which is an awesome number of lightsabers. Anyone else owns 0. Note: your function should have a default parameter. For example(Input --> Output): "anyone else" --> 0 .. 2023. 1. 9.
2023년 1주차 '2022년 하반기 회고' 2023년 첫 번째 주간 회고는 2022년 하반기 회고로 시작하겠다. 시장지표 프로젝트 지수/환율/원자재 데이터를 웹소켓을 통해 가져오는 프로젝트를 진행했었다. 내게는 도전적인, 그리고 버그도 많았던.. 프로젝트이기에 가장 기억에 남는다. 시장지표 프로젝트와 관련된 글을 이전에 써두었다. 2022.09.04 - [나는 이렇게 일한다/업무 회고] - 시장지표(지수/환율/원자재) 프로젝트 회고 모투대회 프로젝트 모의투자 대회를 열면서 신청자 데이터를 트랙킹 하는 것이 재미있었다. 역시 나는 데이터 볼 때 행복해지는 듯! 신청자들에게 카카오톡 알림톡을 보낼 때는 실수할까 봐 가슴이 두근두근했다..! PR Assemble PR 회고를 꾸준히 해왔는데 리소스가 많이 들어가는 것 같아 이를 한 페이지에서 관리하기 .. 2023. 1. 9.
0107. Exclamation marks series #4: Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string Description: Remove all exclamation marks from sentence but ensure a exclamation mark at the end of string. For a beginner kata, you can assume that the input data is always a non empty string, no need to verify it. Examples remove("Hi!") === "Hi!" remove("Hi!!!") === "Hi!" remove("!Hi") === "Hi!" remove("!Hi!") === "Hi!" remove("Hi! Hi!") === "Hi Hi!" remove("Hi") === "Hi!" Solution: const remo.. 2023. 1. 7.
0106. Is there a vowel in there? Given an array of numbers, check if any of the numbers are the character codes for lower case vowels (a, e, i, o, u). If they are, change the array value to a string of that vowel. Return the resulting array. Solution: function isVow(a){ for (let index in a) { let vow = String.fromCharCode(a[index]) if (["a", "e", "i", "o", "u"].includes(vow)) { a[index] = vow } } return a } const isVow = a => a.. 2023. 1. 7.
0105. Greet Me Write a method that takes one argument as name and then greets that name, capitalized and ends with an exclamation point. Example: "riley" --> "Hello Riley!" "JACK" --> "Hello Jack!" Solution: var greet = function(name) { modifiedName = name.charAt(0).toUpperCase() + name.slice(1).toLowerCase() return `Hello ${modifiedName}!` }; var greet = function(name) { return 'Hello ' + name[0].toUpperCase(.. 2023. 1. 5.