학습 기록/언어 기본

Javascript

서버관리자 페페 2022. 2. 4. 01:53

0.

html 환경에서의 javascript 실행

=<script></script>

 

1.

html과 javascript의 출력 차이

 

2.

on event

 

3

검사 > console(혹은 esc) : JS를 사용가능하게 함

글자수 알람 띄우기 테스트

 

4.

data type(자료형)

 

✔Primitive values(immutable datum represented directly at the lowest level of the language)

- Boolean

- Null

- Undefined

- Number

- Biglnt

- String

- Symbol

✔Objects(collection of properties)

 

참고 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures

 

JavaScript data types and data structures - JavaScript | MDN

Programming languages all have built-in data structures, but these often differ from one language to another. This article attempts to list the built-in data structures available in JavaScript and what properties they have. These can be used to build other

developer.mozilla.org

 

5.

문자 타입에서 사용가능한 기술

.length > 문자 갯수(공백 포함)

.toUpperCase() > 대문자변환

.indexOf('') > 몇번째부터 시작인지

.trim() > 공백 제거

 

 

6.

데이터 타입을 잘 구분해서 사용할 것

넘버와 스트링의 차이

7.

variable을 이용함으로써, 문장 속 특정 포인트를 한 번에 대체하기

var name = 'A';

alert("JavaScript (/ˈɑːvəskrɪpt/),[10] often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web," + name + "alongside HTML and CSS.[11] Over 97% of websites use JavaScript on the client side for web page behavior,[12] often incorporating third-party libraries.[13] All major web browsers have a dedicated JavaScript engine to execute the code on users' devices.

JavaScript is a high-level, often just-in-time compiled" + name + " language that conforms to the ECMAScript standard.[14] It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, " + name + "regular expressions, standard data structures, and the Document Object Model (DOM).")

 

 

8.

CSS : 고정된 백그라운드 컬러

 

9.

javascript로 on/off 가능한 다크모드 구현

javascript 언어로 CSS를 제어함으로써 가능

 

 

10.

comparison operator와 boolean의 입출력

 

11.

if(boolean){}을 사용한 프로그램 분기

if 안의 불리언 값을 설정해두었기 때문에 의미있는 코드는 아님, 단지 불리언에 따라 if와 else 중 어떤 것이 출력되는지 확인할 것

 

12.

if(boolean) 을 사용해서 on/off 통합 TOGGLE 만들기(다크모드)

'학습 기록 > 언어 기본' 카테고리의 다른 글

for 시행 공간  (0) 2022.12.06
JAVA  (0) 2022.05.10
node js  (0) 2022.04.30
CSS  (0) 2022.01.25
HTML  (0) 2022.01.19