Upgrade to Pro — share decks privately, control downloads, hide ads and more …

rhyme

 rhyme

2017/3/3 に TIS で発表したLTバトルの資料です。

Yosuke Furukawa

March 03, 2017
Tweet

More Decks by Yosuke Furukawa

Other Decks in Programming

Transcript

  1. JavaScript ʹ͸ Intl.Collator ͱ ͍͏ඪ४ศརϥΠϒϥϦ͕͋Δ const collator = new Intl.Collator('en',

    { sensitivity: 'base' }) var vibes = 0; if (c1 === c2) { // ಉ͡฼ԻͩͬͨΒ vibes +1 vibes += 1 } else if (collator.compare(c1, c2) === 0) { // a, à ͩͬͨΒvibes +0.5 vibes += 0.5 }