結果 : get first n chars of string javascript