added tern for javascript