Skip to content

Instantly share code, notes, and snippets.

@linlymatsumura
Last active December 25, 2017 05:11
Show Gist options
  • Save linlymatsumura/c518ca1c2f0bf69e0d19237c1440df51 to your computer and use it in GitHub Desktop.
Save linlymatsumura/c518ca1c2f0bf69e0d19237c1440df51 to your computer and use it in GitHub Desktop.
黒魔術っぽく月のリストを作る
const months = Array(12).join().split(',').map((v,i)=>{return `${i+1}月`})
console.log(months)
// (12) ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment