What is a module A module is an essential single unit of building a complete program. If your code doesn't have modules, it would be difficult to read and run. How to use module in Node.js? module.exports is used to return an object from the current module when other modules or programs require it. To import module, require keyword is used. Example Code //module.exports returns the result of req..
contains() in HashSet and ArrayList Big-O notation for contains() in HashSet is O(1) which takes constant time and doesn't preserve the order. But, in ArrayList, It takes O(n) which is linear time and ensure the order of the entry. Example Code static int sockMerchant(int n, int[] ar) { Set color = new HashSet(); int pairs = 0; for(int i = 0; i
How does React.js work - React uses JavaScript to creates all the elements you write and pushes them to HTML. - Virtual DOM is used. It's a fast and lightweight copy. Component in React.js - Component is parts of reusable and independent code in React.js. - It does serve like JavaScript functions, but it returns HTML. - When you create React app or show data from React, you deal with Component t..
Download and install Node.js check node.js, npm and npx installed perfectly. Create react app To start React.js, type 'npm start' in Terminal *it should be located where the React app created. 해당 React 디렉토리에 위치하고 있어야함 Compiled successfully Works fine
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', '..
- Total
- Today
- Yesterday
- hackerrank javascript solution
- easy javascript algorithm
- 프로그래머스
- repeat()
- string class in java
- javascript
- algorithm
- 프로그래머스 알고리즘문제
- rest parameter
- math.max
- Collection Framework
- C++
- 알고리즘
- substring()
- code refactoring
- compareTo()
- equals()
- HashMap
- hackerrank javascript
- Javascript Algorithm
- hackerrank
- spring boot application
- 프로그래머스 알고리즘
- hackerrank solution
- math.abs
- easy algorithm
- java
- ... in Javascript
- Object type casting
- HackerRank Algorithm
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |