목록분류 전체보기 (287)
프론트엔드 정복하기
문제 2438번 : 다음을 출력하시오. * ** *** **** ***** [ Solution ] 1. result += '*' 위 구문을 for문 안에 넣으면.. result = '*' => '**' => '***' 반복 result는 '*' => '*' + '*' => '**' +'*' => '***' +'*' .... 가 되므로 for (i=0; i
/hoc/Register_AG_2_Restrict.j import React from 'react'; import {useSelector} from 'react-redux'; export default function(RegisterAG2stepComponent){ function CheckGoTo2step(props){ const user = useSelector(state => state.user); if(!user.agreeSave/* .agreeUsage && !user.agreeSave.agreePersonal */){ alert('잘못된 경로로 접근하셨습니다.') props.history.push('/register_agmall'); } return } return CheckGoTo2step ..
5 입력 ==> 1, 2, 3, 4, 5 를 출력하시오. const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.on('line', (a) => { const input=parseInt(a) for(i=1; i
내 정답 const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); let input = []; rl.on('line', function (line) { input.push(line) }) .on('close', function () { for(i=1; i { const input = line.split(' '); if(input.length === 2) { const A = parseInt(input[0]); const B = parseInt(input[1]); answer += A+B + '\n'; } }).on('close', () =>..
1. javascript로 오늘 날짜 구하기 var today = new Date(); var month = today.getUTCMonth() + 1; //months from 1-12 var day = today.getUTCDate(); var year = today.getUTCFullYear(); today = year + "-" + month + "-" + day; https://webisfree.com/2017-03-30/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EC%84%9C-%EC%98%A4%EB%8A%98-%EB%82%A0%EC%A7%9C%EB%A7%8C-%EA%B5%AC%ED%95%98%EB%8A%94-%EB%B0%..