프로그래머스를 풀면서 사용했던 내장함수들을 정리해보았다.
console.log('toUpperCase', 'toLowerCase')
let words = 'Words'
console.log(words.toUpperCase())
console.log(words.toLowerCase())
toUpperCase toLowerCase
WORDS
words
console.log('reverse')
let arr = [1, 2, 3, 4, 5]
console.log(arr.reverse())
reverse
[ 5, 4, 3, 2, 1 ]
console.log('toString', 'split', 'join')
let number = 1029342
console.log(number.toString())
console.log(typeof(number.toString()))
console.log(number.toString().split(''))
console.log(number.toString().split('').join(''))
toString split join
1029342
string
[
'1', '0', '2',
'9', '3', '4',
'2'
]
1029342