[swift] 66. Any

RudinP·2023년 10월 26일
0

Study

목록 보기
93/227

Any 타입

  • 자료형이 정해져있지 않음
  • 어떤 자료형이라도 받을 수 있음
  • 대표적으로 print 함수는 매개변수로 Any를 받음
var things = [Any]()

things.append(0)
things.append("우엉")
things.append(("우엉", 1))
//기타 등등 closure, struct, class 전부 가능
profile
곰을 좋아합니다. <a href = "https://github.com/RudinP">github</a>

0개의 댓글