Today we're going to make the back end for an app that can convert words to emojis, search for emojis, and give you a random emoji. It's gonna be 🔥.
The three functions you'll have to write are NOT in order in the test terminal results. Tackle them in whatever order you want to!
For each test, you'll have to:
- Create a file with the name from the test. For
emagify.test.js
, your file is going to be calledemagify.js
, and so on. - Uncomment the test file's
require
line for that file. This gives that file access to your file! - After you've written a function (or even just the skeleton for one), you should add a
module.exports =
and the name of the function (but without parentheses!) at the bottom of the file. This gives the test file something to import! - You will likely have to grab
symbols
andwords
from their files in the same way. Get used torequire
andmodule.exports
for importing and exporting between files!
- Array's
.includes
- String's
.includes
- Array's
.indexOf
- Math's
.floor
and.random