본문 바로가기 메뉴 바로가기

Studying programming

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Studying programming

검색하기 폼
  • Jimin's Programming (194)
    • Algorithms (54)
    • JavaScript (16)
    • Vue.js (3)
    • Node.js (3)
    • React.js (7)
    • React Native (0)
    • Spring Boot (13)
    • JAVA (58)
    • C++ (17)
    • Programming (19)
    • Computer basics (4)
  • 방명록

JavaScript (16)
Rest parameter

Use Rest parameter(...args) to allow accepting an indefinite number of arguments and store them in an array const arrow = (...args) => { console.log(args); } arrow(1,2,3,4); output [1,2,3,4] - it returns array

JavaScript 2020. 8. 26. 22:22
How to run your Javascript test code in Chrome

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.

JavaScript 2020. 7. 28. 12:17
Single-thread in JavaScript

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..

JavaScript 2019. 9. 6. 06:44
Promise

Promise 거의 대부분의 비동기 작업에서 콜백이 중첩으로 일어나기 때문에 '콜백지옥'을 벗어나기 위해 Promise를 사용한다. Example Code module.exports.getManagers = () => { return new Promise((resolve, reject) => { var manager = []; for(var i = 0; i

JavaScript 2019. 9. 4. 02:28
Callback function in JavaScript

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', '..

JavaScript 2019. 8. 28. 03:39
Arrow function in JavaScript

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사..

JavaScript 2019. 8. 28. 02:31
이전 1 2 3 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • 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
more
«   2025/08   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바