Skip to content

Instantly share code, notes, and snippets.

@rosd89
rosd89 / post_1_2.js
Created January 14, 2019 23:57
내가 개발을 시작했던 방법 - 2
(_ => {
for (let i = 2; i < 10; i++) {
console.log(`${i} * 1 = ${i}`);
console.log(`${i} * 2 = ${i * 2}`);
console.log(`${i} * 3 = ${i * 3}`);
console.log(`${i} * 4 = ${i * 4}`);
console.log(`${i} * 5 = ${i * 5}`);
console.log(`${i} * 6 = ${i * 6}`);
console.log(`${i} * 7 = ${i * 7}`);
console.log(`${i} * 8 = ${i * 8}`);
@rosd89
rosd89 / post_1_1.js
Created January 4, 2019 14:30
내가 개발을 시작했던 방법 - 1
(_ => {
console.log("2 * 1 = 2");
console.log("2 * 2 = 4");
console.log("2 * 3 = 6");
console.log("2 * 4 = 8");
console.log("2 * 5 = 10");
console.log("2 * 6 = 12");
console.log("2 * 7 = 14");
console.log("2 * 8 = 16");
console.log("2 * 9 = 18");
const generator = function*(i, j){
for(let ii = 1; ii <= i; ii++) {
for(let jj = 1; jj <= j; jj++) {
yield [ii, jj, ii * jj];
}
}
};
for(const [i, j, k] of generator(9,9)){
console.log(`${i} x ${j} = ${k}`);
@rosd89
rosd89 / codespitz_75_2_1.html
Last active March 22, 2018 08:30
코드스피츠 S75 2일차 1번 과제 제출
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>75 - 2</title>
</head>
<body>
<img id="a"/>
<div id="b"></div>
@rosd89
rosd89 / codespitz_75_1.html
Last active November 25, 2018 09:05
코드스피츠 S75 1일차 과제 제출
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<section id="data"></section>
<script type="text/javascript">
const CError = class extends Error {
const lenCheck = (n, str) => str.length < n ? '0'.repeat(n - str.length) + str : str;
function solution(n, arr1, arr2) {
const answer = [];
for(let i=0; i<arr1.length; i++) {
const n1 = lenCheck(n, (+arr1[i]).toString(2));
const n2 = lenCheck(n, (+arr2[i]).toString(2));
const l = [];
@rosd89
rosd89 / aaaaaa.js
Last active September 16, 2017 06:45
function solution(dartResult) {
const answer = dartResult.match(/(\d+|\D)/g).reduce((p, c) => {
let n = 0;
switch(c) {
case '*' :
const n1 = p.pop();
const n2 = p.pop();
if(n2) p.push(n2 * 2);
p.push(n1 * 2);
const axios = require('axios');
const querystring = require('querystring');
const headers = {'Content-Type': 'application/x-www-form-urlencoded'};
/**
* ajax http get request
*
* @param url
* @param params
@rosd89
rosd89 / vue_todo_6.html
Last active August 23, 2017 11:22
Vue·tiful Korea 170823 컴포넌트야 놀자
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>todo</title>
</head>
<body>
<div id="root"></div>
</body>
@rosd89
rosd89 / vue_todo_5.html
Last active August 22, 2017 12:11
Vue·tiful Korea 170823 컴포넌트야 놀자
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>todo</title>
</head>
<body>
<div id="root"></div>
</body>