Skip to content

Instantly share code, notes, and snippets.

@ryu1-1uyr
Last active May 10, 2018 05:39
Show Gist options
  • Save ryu1-1uyr/b1204e7a008a11e0762eefb0faf8e542 to your computer and use it in GitHub Desktop.
Save ryu1-1uyr/b1204e7a008a11e0762eefb0faf8e542 to your computer and use it in GitHub Desktop.
yammerにさらすよう。ちょっとだけ読みやすくしてる。でもまだださい。
let [F,B,i,p] = ["Fizz","Buzz",(-~[]),console.log];
for(;i<=((-~[]+[])+(![]-[])+(![]-[]))-[];i++){
i%3==0?i%5==0?p(F+B):p(F):i%5==0?p(B):p(i)
}
@omas-public
Copy link

-[]-[] と -[] って同じじゃないかな? (-1 - 0) , (-1)

@ryu1-1uyr
Copy link
Author

@omas-public -[]と-[]-[]はたしかに同じ意味ですね。for文のとこは文字列で'100'を作って型変換してるので、こんな書き方になってます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment