인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

jane's profile image
jane

asked

Learn TypeScript with a real-world project

function $(selector) 관련 질문 드립니다.

Resolved

Written on

·

251

1

유틸 함수를 정의해서 쓰셨던데요. 이게 정확히 무슨 문법인가요?

제이쿼리 처럼 생기기도 하고, 좀 자세히 찾아보고 싶은데 키워드를 모르겠네요.

function $(selector) { return document.querySelector(selector); } function getUnixTimestamp(date) { return new Date(date).getTime(); }

es6typescript

Answer 1

0

captain님의 프로필 이미지
captain
Instructor

안녕하세요, 강의에서 안내해 주신 코드는 제가 직접 작성한 코드라 따로 레퍼런스가 있진 않아요 :)

jane님의 프로필 이미지
jane
Questioner

$(selector) 라고 적은신게 $가 아무 의미가 없나요?

아닙니다.. 뒤에 강의를 더 들으니깐 나오네요... $ 자체가 함수 이름이였군요...

변수 혹은 제이쿼리 같은 문법인줄 알았습니다

jane's profile image
jane

asked

Ask a question