Conditional

CONDITIONAL(조건문)

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’(논리 연산자)

AND: &&

OR: ||

NOT: ! (falsy) **memorize

Number.isNaN(anything)

STRING METHODS = IMMUTABLE

  • If you do string type + any different type, it becomes string type automatically.

length,

find value,

  • if there is no value, it returns -1

lastIndexOf

  • find index from the back and check the order from the front.

str.includes(searchValue)

  • does not work at outdated browser and returns as Boolean

separate,

get certain values from the string,

Uppercase/Lowercase

Math

  • Math.floor(x) = 내림;
  • Math.ceil(x) = 올림;
  • Math.round(x) = 반올림;
  • Math.pow(base, exponent) = 제곱

trim() : remove space inside string

\n : new line

--

--

--

Consistency achieves everything https://github.com/paigekim29

Love podcasts or audiobooks? Learn on the go with our new app.

JavaScript Basics

duckett books for html css & javascript

Kapten @ International Javascript Conference 2019

#189: Limited to 36 Hours — Exchange 1,000 Otaku Coins (XOC) for 10x Otaku Coin Official Stickers!

Explaining Recursion in JavaScript

Frontend Weekly Digest #257 (25–30 April 2022)

Stack Navigation in React Native Expo

CodeBuild: Automated tests using Cypress

My 7-Day Strategy To Get Started With Vue.js or Any JS Framework

Sticky notes on board

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joo Hee Paige Kim

Joo Hee Paige Kim

Consistency achieves everything https://github.com/paigekim29

More from Medium

CSS !important Rule

CSS Modules

INTRODUCTION TO RADIAL-GRADIENT IN CSS

CSS Lesson 3: The Basics of Backgrounds