길/Javascript 기본

연산자 사용시 number/string

7he8oy 2021. 1. 26. 20:03
'5'%2 //1 

이런 코드가 먹힌다.

'+'이외의 연산자들은 

number와 string간의 계산이 그대로 작동한다.

' > Javascript 기본' 카테고리의 다른 글

const에 array, object 재할당  (0) 2021.01.27
Object.keys() / Object.values  (0) 2021.01.26
three dots (...)  (0) 2021.01.26
scope & closer  (0) 2021.01.26
왜 typeof null은 object일까.  (0) 2021.01.26