1
u/Harbltron Nov 03 '20
WOW, includes() is almost perfect for conditionals in the game I'm making; if the word in question exists in the text prompt then I can use that as a flag instead of explicitly storing conditions elsewhere.
Thanks!
2
2
3
3
u/imapersonithink Nov 03 '20 edited Nov 03 '20
It's best practice to use 'const' instead of 'let', unless you plan on changing the value.
2
Nov 03 '20
This is really great... just need to fix up a few small details, but overall really awesome
1







3
u/skerit Nov 03 '20
Be careful when using
String#length, some unicode characters count for 2. Take "🔥" for example. Splitting this string in half will break the emoji.