사랑하애오
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
  • 홈
  • 태그
  • 방명록

[프로그래머스 | 자바스크립트] 옹알이

솔루션1 const convertPWordsToNum = (word) => { const pWords = ["aya", "ye", "woo", "ma"]; return pWords.reduce((result, pWord, i) => result.replaceAll(pWord, i), word); }; const canPronounce = (word) => { const result = convertPWordsToNum(word); return ( !/[^\d]/.test(result) && [...result].every( (num, i) => i + 1 > result.length || num !== result[i + 1] ) ); }; function solution(babbling) { conso..

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

티스토리툴바