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.

多言語FizzBuzzチャレンジ16日目:JavaScript

Last updated at Posted at 2022-12-15

これまでのまとめ

本日のお品書き

みんな大好きJavaScriptです。不慣れな関数型言語が続いていたので少しほっとしますね。(いや、関数型言語も面白いんですけどね)

FizzBuzz

for (let i = 1; i < 101; i++) {
  if (i % 15 === 0) {
    console.log("FizzBuzz");
  } else if (i % 3 === 0) {
    console.log("Fizz");
  } else if (i % 5 === 0) {
    console.log("Buzz");
  } else {
    console.log(i);
  }
}

おまけ:実行環境

denoでさくっとやるだけですね。formatもお任せできるので適当にスクリプト書いて実行する分には本当にお手軽でありがたいです。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?