사랑하애오
close
프로필 배경
프로필 로고

사랑하애오

  • 분류 전체보기
    • 정보처리기사 기출문제
      • 2020년
    • AWS
    • HTML, CSS, Layout, Grid
    • JavaScript, JQuery
    • C++
    • Node.js
    • Linux
      • centosOS
    • BlockChain
      • 기술면접
      • 비트코인
      • 이더리움
    • VSCode
    • Network
    • Solidity
    • JAVA
      • SpringBoot
      • SpringBoot Shoppingmall
      • SpringBoot CRUD Board
      • Eclipse
    • MySQL
    • React.JS
      • Redux-Saga
    • 프로그래머스(Javascript)
      • Level 0
  • 홈
  • 태그
  • 방명록

[프로그래머스 | 자바스크립트] 대문자와 소문자

솔루션 const solution = (my_string) => { const str = [...my_string]; console.log(str); const answer = str .map((v) => (v === v.toUpperCase() ? v.toLowerCase() : v.toUpperCase())) .join(""); console.log(answer); return answer; }; 솔루션 const solution = (my_string) => { let answer = ""; for (const str of my_string) { answer += str === str.toLowerCase() ? str.toUpperCase() : str.toLowerCase(); } console..

  • format_list_bulleted 프로그래머스(Javascript)/Level 0
  • · 2023. 2. 19.
  • textsms

[프로그래머스 | 자바스크립트] 문자열안에 문자열

솔루션 const solution = (str1, str2) => { const answer = str1.includes(str2) ? 1 : 2; console.log(answer); return answer; }; 솔루션 const solution2 = (str1, str2) => { const answer = str1.split(str2).length > 1 ? 1 : 2; console.log(answer); return answer; };

  • format_list_bulleted 프로그래머스(Javascript)/Level 0
  • · 2023. 2. 5.
  • textsms

[프로그래머스 | 자바스크립트] OX 퀴즈

솔루션 const solution = (quiz) => { const answer = quiz.map((v) => { const [formula, answer] = v.split("="); return eval(formula) === +answer ? "O" : "X"; }); console.log(answer); return answer; };

  • format_list_bulleted 프로그래머스(Javascript)/Level 0
  • · 2023. 2. 5.
  • textsms
  • navigate_before
  • 1
  • navigate_next
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바