結果 : take first n characters of string javascript