반응형
with구문은 다음과 같이 객체의 이름과 점(dot) 없이 기술 할 수 있습니다.
Syntax
with (object) { properties used without the object name and dot } |
일반적으로 사용 할 떄
x = Math.cos(1 * Math.PI) + Math.sin(Math.LN5) y = Math.tan(2 * Math.E) |
with 구문
with (Math){ x = cos(1 * PI) + sin (LN5) y = tan(2 * E) } |
※ The ‘with’ keyword is used as a kind of shorthand for referencing an object's properties or methods.
The object specified as an argument to with becomes the default object for the duration of the block that follows. The properties and methods for the object can be used without naming the object.
반응형
'보관함' 카테고리의 다른 글
앨리스 김도연(이다인) 사주, 프리미엄운세 (0) | 2020.09.27 |
---|---|
미카미 유아, 어제는 나고야에 나고야식 타이완 소울푸드 미센 (味仙) 너무 맛있다. (0) | 2020.09.12 |
JavaScript 페이지이동 (0) | 2020.08.19 |
JavaScript 함수 (0) | 2020.08.19 |
HTML 5 Standard Events (0) | 2020.08.19 |