LoginSignup
0
0

More than 3 years have passed since last update.

javascript 問題集 No.28 String.splitを自作せよ

Posted at

ルール上splitを使うことができないので、for文を回して”,”が出るまで最終の[]にpushしていく。

学んだこと
array=["abc","abc","abc"]を作る時

array=[]
obj=""

for~
if~ array.push(obj)
else~ obj+=abc

<ポイント>
・空白の""の中に入れる時は+=を使える。
・最後は","がないので、pushすること。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0