Always need ‘Comparison Operator’(비교 연산자)
- > more than
- < less than
- >= ane more
- <= and less
- === equal
- !== not equal
- Result is always ‘boolean’(true/false)
- else can be omitted depends on function.
To apply 2 conditions together, use ‘Logical Operator’(논리 연산자)
NOT: ! (falsy) **memorize
- In order to check NaN
STRING METHODS = IMMUTABLE
- If you do string type + any different type, it becomes string type automatically.
- if there is no value, it returns -1
- find index from the back and check the order from the front.
- does not work at outdated browser and returns as Boolean
get certain values from the string,
- if start value is negative, it applies as 0.
- To see difference: reference: https://stackoverflow.com/questions/2243824/what-is-the-difference-between-string-slice-and-string-substring
- Math.floor(x) = 내림;
- Math.ceil(x) = 올림;
- Math.round(x) = 반올림;
- Math.pow(base, exponent) = 제곱
trim() : remove space inside string
\n : new line