Skip to content

Instantly share code, notes, and snippets.

@kshibata101
kshibata101 / js3_mode_setting
Last active August 29, 2015 13:58
js3-mode
;; js3-mode
(autoload 'js3-mode "js3" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js3-mode))
(custom-set-variables
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(js3-indent-level 4)
'(js3-auto-indent-p t)
'(js3-indent-on-enter-key t)
'(js3-enter-indents-newline t)
@kshibata101
kshibata101 / javascript_class_implementation.md
Last active July 10, 2021 13:37
Javascriptにおけるクラスの実装方法

Javascriptでクラスを継承する方法

Jsにはクラスがないので正確ではないけど気にしない

クラス宣言

Javascriptのクラスの宣言は主に

  • var Hoge = function(){}
  • function Hoge() {}

の2通りがある