Exercise in js.