javascript class term2