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.

イテレーター(ES6)

Last updated at Posted at 2021-11-26

イテレーターとは

イテレーターとは配列に対して関数を適用し、スマートな書き方で
コーディングできるメソッドです。

###使用例

イテレーター
const array = ["鈴木くん", "佐々木くん", "田中さん"]
let students = ''
array.forEach((v) => {students = students + `<td>${v}</td>`})

console.log("<table><tr>" + students + "</tr></table>")

特徴

  • JSX等で配列を加工して使う際に利用できる。
  • 人によって可読性が変わるので、コード規約等で統一できると良い
0
0
1

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?