View random.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1~90 번호 생성기 | |
const subjectNumbers = Array.from(Array(90).keys()).map((number) => number + 1); | |
const timetableGenerator = () => { | |
// 빈 배열 생성기 -> 할당되지 않은 과목번호는 0 | |
const times = new Array(7); | |
for (let i = 0; i < times.length; i++) { | |
times[i] = Array.from(new Array(10)).map(() => 0); | |
} | |
return times; | |
}; |
View uuidGenerator.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create_UUID(){ | |
var dt = new Date().getTime(); | |
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = (dt + Math.random()*16)%16 | 0; | |
dt = Math.floor(dt/16); | |
return (c=='x' ? r :(r&0x3|0x8)).toString(16); | |
}); | |
return uuid; | |
} |
View vscode.setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.colorTheme": "Atom One Dark", | |
"atomKeymap.promptV3Features": true, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.tabSize": 2, | |
"editor.formatOnSave": true, | |
"editor.formatOnPaste": true, | |
"prettier.eslintIntegration": true, | |
"eslint.autoFixOnSave": true, | |
"tslint.autoFixOnSave": true, |
View TickingClockWithComponent_index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReactDOM.render( | |
<Clock />, | |
document.getElementById('root') | |
); |
View TickingClockWithComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Clock(props) { | |
return ( | |
<div> | |
<h1>Hello, world!</h1> | |
<h2>It is {props.date.toLocaleTimeString()}.</h2> | |
</div> | |
); | |
} | |
function tick() { |
View ExtractingComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Comment(props) { | |
return ( | |
<div className="Comment"> | |
<div className="UserInfo"> | |
<img className="Avatar" | |
src={props.author.avatarUrl} | |
alt={props.author.name} | |
/> | |
<div className="UserInfo-name"> | |
{props.author.name} |
View ComposingComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Welcome(props) { | |
return <h1>Hello, {props.name}</h1>; | |
} | |
function App() { | |
return ( | |
<div> | |
<Welcome name="Sara" /> | |
<Welcome name="Cahal" /> | |
<Welcome name="Edite" /> |
View ComposingComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Welcome(props) { | |
return <h1>Hello, {props.name}</h1>; | |
} | |
function App() { | |
return ( | |
<div> | |
<Welcome name="Sara" /> | |
<Welcome name="Cahal" /> | |
<Welcome name="Edite" /> |
View ClassComponent.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Welcome extends React.Component { | |
render() { | |
return <h1>Hello, {this.props.name}</h1>; | |
} | |
} |
View HelloWorld.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is index.js written by JSX | |
const element = <h1>Hello, world</h1>; | |
ReactDOM.render( | |
element, | |
document.getElementById('root') | |
); |
NewerOlder