javascript amount word code