성실한 사람이 되자

성실하게 글쓰자

This is spear

숫자 2

node를 이용해 배우는 javascript 8 (javascripting-NUMBER TO STRING in nodeschool )

오늘도 맥북으로 문제를 풀게 됐습니다. 윈도우에서의 명령프롬프트와 명령어가 다르니 주의해주세요. 문제보기 Create a file named number-to-string.js. number-to-string.js. 파일 생성 In that file define a variable named n that references the number 128; n이라는 변수를 정의하고 숫자 128을 레퍼런스 해주세요 Call the .toString() method on the n variable. n이라는 변주를 .toString() method와 함께 불러주세요. Use console.log() to print the results of the .toString() method to the terminal. ..

node를 이용해 배우는 javascript 6 (javascripting-NUMBERS in nodeschool )

오늘은 문자열이 아닌 숫자를 확인해보도록 하겠습니다. 문제보기 1. number.js 파일을 생성합니다. 2. 변수 example을 생성하고 integer인 123456789를 레퍼런스합시다. 3. 콘솔에 숫자를 찍어주세요 4. 마지막으로 확인까지 해결하기 notepad numbers.js 여기서 중요한 점은 ' ' 가 없다는 겁니다. 만약에 숫자 양 끝에 ' '가 붙어 있다면 이건 문자열이 되는 겁니다. let exam = 123456789 console.log(exam) 터미널에서 콘솔 찍어보기 node numbers.js 확인하기 짜잔 문자열은 숫자가 될 수 없지만 숫자는 문자열이 될 수도 있습니다. 만약에 '1234' 이런식으로 숫자의 양 끝에 ' ' 표가 붙는다면 이 것은 문자열로 인식이 될 것..