-
[js] static variables in javascript코딩일지/TIL 2022. 7. 1. 19:47
static variable 사용법
class Person { constructor(){} static type() { return "Human"; } static numberOfLegs(){ return 2; } }
References
[1]Declaring static constants in ES6 classes? - Stack Overflow
'코딩일지 > TIL' 카테고리의 다른 글
[js] Clipboard API (0) 2022.07.08 [js, DOM] DOMRect Object (0) 2022.07.04 [html,js] 외부 package import 하는 방법 (0) 2022.07.01 [css] scroll-snap (0) 2022.07.01 [js] how to remove a dom (0) 2022.06.30