JavaScript实现简单类。

Signed-off-by: cyberzhg <cyberzhg@gmail.com>