Javascript Define Class