0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

javascript splitメソッドの使い方

Last updated at Posted at 2022-12-06

競プロのサンプル問題にsplitメソッドがあったので忘れないように記事化。

splitメソッドは、文字列をある文字で区切って分割する関数である。

使い方は、

文字列(※変数).split(区切り文字)





例えばこのように記述すると、

スクリーンショット 2022-12-06 21.13.16.png

↓↓このように出力される。↓↓

スクリーンショット 2022-12-06 21.14.38.png

0
0
2

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?