* Update JS and TS code style * Add JavaScript and TypeScript code of top_k * Update top_k.ts * Apply suggestions from code review Co-authored-by: Justin Tse <xiefahit@gmail.com> * Apply suggestions from code review Co-authored-by: Justin Tse <xiefahit@gmail.com> --------- Co-authored-by: Yudong Jin <krahets@163.com>