Use Array.prototype.length to avoid magic number

This commit is contained in:
Aya Morisawa 2018-08-16 05:15:06 +09:00
parent aa9fe38c25
commit fa95641f88

View File

@ -1,6 +1,8 @@
export default () => [ const kaos = [
'(=^・・^=)', '(=^・・^=)',
'v(\'ω\')v', 'v(\'ω\')v',
'🐡( \'-\' 🐡 )フグパンチ!!!!', '🐡( \'-\' 🐡 )フグパンチ!!!!',
'🖕(´・_・`)🖕' '🖕(´・_・`)🖕',
][Math.floor(Math.random() * 4)]; ];
export default () => kaos[Math.floor(Math.random() * kaos.length)];