코테

문자열을 정수로 바꾸기

콩쥐땃쥐 2024. 9. 6. 09:49

function solution(s) {
    return Math.floor(s);
}

 

그냥 문자열 -> 배열이라 Math.floor 사용하면 된다.