Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- react Page
- react jsx if
- Spring JPA
- 코드 중복제거
- step 테이블
- 텍스트가 많은 경우
- Spring Entity
- react forwardRef
- editor Quill
- react
- JPA Update\
- spring builder
- react link
- springbatch
- react Quill
- javascrpit 기초
- javascript 기초
- Javascript
- javascript 함수
- springbatch chunk
- SpringBatch 스키마
- react quill custom
- JPA Insert
- spring security
- Docker Windows 설치
- Spring Controller return
- spring
- Spring DTO
- Spring CORS
- react react-router-dom v6
Archives
- Today
- Total
천천히 알아보는 코딩공부
JavaScript 기초 정리 2 본문
setInterval, setTimeout
- 시간 딜레이 후에 function 실행
function sayHello()
{
console.log("Hello");
}
setInterval(sayHello, 5000);
// 5초마다 SayHello 실행(반복)
setTimeout(sayHello, 5000);
// 5초 지연뒤에 실행(한번)
Date
const date = new Date();
let hours = date.getHours(); // 시간
let minutes = date.getMinutes(); // 분
let seconds = date.getSeconds(); // 초
date.getDate(); // 일자
date.getMonth(); // 월
date.getFullYear(); //년
시계 만들기
let clock
const date=new Date();
clock.innerText=(`${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`);
Math
Math.random() // 0~1 부터 숫자 결과값 0.1231244445
Math.random() * 10 // 1~10 부터 숫자 결과값 4.1231244445
Math.round(1.2) // 1
Math.round(0.8) // 1
Math.ceil(1.2) // 2
Math.ceil(1.01) // 2
Math.floor(1.9) // 1
Math.floor(1.01) // 1
Math.floor(Math.random() *10) // 1~10 결과
https://developing-stock-child.tistory.com/66
[JavaScript] Math 함수 정리
[JavaScript] Math 함수 정리 Math is a built-in object that has properties and methods for mathematical constants and functions. It’s not a function object. -> Math 객체는 수학에서 자주 사용하는 상..
developing-stock-child.tistory.com
'JavaScript > 기초' 카테고리의 다른 글
javascript 기본 타입, 참조 타입(객체 타입) (0) | 2022.04.19 |
---|---|
javascript 태그 추가 (0) | 2022.03.31 |
HTML in Javascript (0) | 2022.03.21 |
CSS in JavaScript (0) | 2022.03.20 |
JavaScript 기초 정리 (0) | 2022.03.16 |
Comments