Skip to content

Instantly share code, notes, and snippets.

/**
* 상속(Inheritance)
* Manager는 Employee의 getSalary 메서드를 상속받아 사용할 수 있고 추가적으로 자신만의 getBonus 메서드를 정의한다.
* 하지만 Manager가 단순히 Employee의 특수한 형태라고 볼 수 없는 경우 상속은 부적절할 수 있다.
* 이 예제에서는 Manager가 Employee일 수도 있지만 추가적인 역할로 인해 혼란이 생길 수 있다.
*/
class Employee {
getSalary() {
return 50000;
}
@ungmo2
ungmo2 / test.js
Created September 14, 2017 17:03
push / spread operator / concat 성능 비교
let users = [
// { id: 1, name: 'Lee', role: 'Administrator' },
// { id: 2, name: 'Baek', role: 'Developer' },
// { id: 3, name: 'Park', role: 'Designer' }
];
// push / spread operator / concat
// push
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hamburger Button</title>
<style>
* {
box-sizing: border-box;
}
<!DOCTYPE html>
<html>
<head>
<style>
body,
html {
height: 100%;
}
.parallax {
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>The Shapes of CSS</title>
<style>
* {
margin: 0;
padding: 0;
}
@ungmo2
ungmo2 / vanilla-js-cheatsheet.md
Created September 9, 2016 08:40 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
<!DOCTYPE html>
<html>
<head>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

1. Mac

Delete cache

$ sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Dotted background overlay effect in CSS</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"],