TS type

박종혁·2021년 8월 24일
0

String 타입과 string 타입의 차이

String은 생성자
string은 지정할 수 있는 string타입을 의미

var str: String = new String("Hello world"); // Uses the JavaScript String object
var str: string = String("Hello World"); // Uses the TypeScript string type

ref:
https://stackoverflow.com/questions/14727044/what-is-the-difference-between-types-string-and-string?rq=1

profile
메모 메모

0개의 댓글