function phoneFomatter(num,type){
var formatNum = '';
if(num.length==11){
if(type==0){
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-****-$3');
}else{
formatNum = num.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3');
This file contains hidden or 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
# Chapter 1 | |
Web3.js | |
## basic | |
### 컨트랙트 | |
```solidity | |
pragma solidity ^0.4.19; |
This file contains hidden or 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
docker run -d -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=password postgres |
This file contains hidden or 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
let getGCD = (num1, num2) => { | |
let gcd = 1; | |
for(let i=1; i<=Math.max(num1, num2); i++){ | |
if(num1 % i === 0 && num2 % i === 0){ | |
gcd = i; | |
} | |
} | |
return gcd; | |
} |
This file contains hidden or 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
print("Hello World") |
NewerOlder