
Option 1. If you already have installed Node.js, simply type node 'your JS file' to run your code. JavaScript engine 이 node.js 에 있어서 Browser 와 index.html 없이도 excute될 수 있다. Option 2. 1. enable Live Edit 2. Set Chrome as a default browser 3. Click the debug button to open the Chrome browser. 4. In Chrome, press alt + cmd + i to launch developer tools to check the result.
Java Script is a single thread, not multi-thread. If there is another function in use, other functions should wait in Queue until it's done. Java and C# allow multi-thread. 자바스크립트는 single-thread 이므로 앞선 실행문이 call stack 에서 실행되는 동안 Queue(Java Script event 엔진이 주기적으로 할 일 확인하는 곳)에서 앞선 실행문이 끝나기를 기다린다. Example Code function first(){ setTimeout(function (){ console.log('start timer') }, 1500); // It's su..
Callback function Callback handles a function execution when you want a function execution right after the return of other functions. Example Code I var users = ["Megan", "Kathy", "John"]; function addUser(username){ setTimeout(function(){ users.push(username); }, 200); } function getUsers(){ setTimeout(function() { console.log(users); }, 100); } addUser("Kitty"); getUsers(); output [ 'Megan', '..
Function declaration 일반적인 함수선언 function foo() {}; Function expression 함수표현식 const foo = function(){}; Arrow function 화살표함수 const foo = () => {}; const foo = num => {}; //single parameter는 {}생략가능. ()가능. return생략가능 간단한 화살표함수의 활용 function(num){return `saved ${num}`}; //위의 내용을 arrow function을 사용하면 간단해진다 num => `saved ${num}`; //parameter가 하나고 한 줄이면 {}와 return 생략가능 *JavaScript들어가거나 multi-line string사..
- Total
- Today
- Yesterday
- hackerrank solution
- 알고리즘
- spring boot application
- hackerrank
- java
- equals()
- Javascript Algorithm
- easy javascript algorithm
- math.max
- code refactoring
- rest parameter
- C++
- javascript
- easy algorithm
- Object type casting
- 프로그래머스 알고리즘문제
- compareTo()
- algorithm
- 프로그래머스
- ... in Javascript
- repeat()
- HashMap
- math.abs
- substring()
- Collection Framework
- hackerrank javascript solution
- hackerrank javascript
- 프로그래머스 알고리즘
- HackerRank Algorithm
- string class in java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |