这是indexloc提供的服务,不要输入任何密码
Skip to content

BGM-109/ts-codefactory

Repository files navigation

1. Union

  • copilot comment

StringOrBoolean = string | boolean; - 이 행은 StringOrBoolean이라는 문자열 또는 부울일 수 있는 새 유형을 정의합니다.

let karina: StringOrBoolean = "karina"; - 여기서 변수 karina는 StringOrBoolean 유형으로 선언되고 처음에는 문자열 값이 할당됩니다.

karina = true; - 그런 다음 변 수 karina에 부울 값이 할당됩니다. StringOrBoolean은 문자열이거나 부울일 수 있으므로 허용됩니다.

StrBoolNull = string | boolean | null; - 이 행은 StrBoolNull이라는 문자열, 부울 또는 null일 수 있는 또 다른 새로운 유형을 정의합니다.

leet winter: StrBooolNull = "winter"; - StrBooolNull 타입의 가변 겨울이 선언되고, 처음에는 문자열 값이 할당됩니다.

winter = true; 및 winter = null; - 그런 다음 변수 winter에는 부울 값과 null 값이 할당되며, StrBoolNull은 문자열, 부울 또는 null일 수 있으므로 둘 다 허용됩니다.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •