멋쟁이사자처럼 블록체인 3기 2화

이정호·2023년 3월 14일
0

blockchain-class

목록 보기
2/35

외우지말고 이러한 기능들이 있다는것만 인지후 구글검색으로 사용

script src=""

문자열:string
숫자형:int,float
boo: true,false

Math.random() => 0이상 1미만의 실수(float)
parseInt() =>소수점은 버리고 정수로 변환

변수.push(2); => 변수배열안에 2를 넣어준다.

반복문 : for,while
for =>특정 횟수만큼
while =>특정 조건이 충족될때까지

.indexOf(값) => 값이 있으면 위치, 없으면 -1

.length => 배열의 길이

.sort() => 배열값 정렬
ex) lotto=[1,2,3,11,22,33];
lotto.sort() => 1,11,2,22,3,33 => 이렇게 출력된다 =>이걸 방지하기위해
.sort(a,b=>(a-b)) => b-a하면 내림차순

.substring()함수 => 문자열을 자를때

jQuery 시작하기

https://releases.jquery.com/
$(선택자).행위; => document.getElementById('content').value == $('#content').val();
hello라는 function이 있을때 => $('#content').click(hello)

.animate({left : '+=250'}) => 왼쪽간격에서 250만큼 증가한값으로 이동.

.fateout() =>
.fateout(funtcion() {

}
)

.css() =>

자바스크립트의 모든것은 객체다

Date 객체 참고 문서
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Date

//1. Date 객체 생성
var now = new Date();
//2. 연도를 가져오는 메서드 .getFullYear()
console.log(now.getFullYear());
//3. 월 정보를 가져오는 메서드 .getMonth() {0: 1월, 1: 2월, ... 10: 11월, 11: 12월}
console.log(now.getMonth());
//4. 일 정보를 가져오는 메서드 .getDate()
console.log(now.getDate());
//5. 1970년 1월 1일 00:00:00을 기준으로 흐른 시간을 밀리초로 표시하는 메서드 .getTime()
console.log(now.getTime());
//6. 특정 일의 Date 객체 생성
var christmas = new Date('2020-12-25');
console.log(christmas);
//7. 특정 ms의 Date 객체 생성
var ms = new Date(1000);

Math.floor() => 소수점을 날려준다

Git 사용법

// 시작하기: git init
// 유저 이름 설정: git config --global user.name "codelion-jocoding"
// 이메일 등록: git config --global user.email #####@gmail.com
// 파일 추가: git add .
// 메세지 입력: git commit -m "first commit"
// 보낼 곳 등록: git remote add origin ex)https://github.com/codelion-jocoding/myrepo.git
// 보낼 곳으로 코드 전송: git push origin master

profile
블록체인 프론트엔드 개발자 입니다.

0개의 댓글

관련 채용 정보