In this lab, you will be exploring asynchronous Javascript using callbacks
Fork the Online REPL for this assignment. Complete your work in the online editor
Write a function called isEven
that receives 2 parameters:
Determine if the number is even. If so, invoke the callback with true as an argument, otherwise, false
Create an array of numbers.
console.log()
the return value from isEven()
Write a function called contents
that receives 1 parameter:
A File Name
fs
module, open and read the contents of the fileconsole.error()
if anything goes wrong.You can test this by calling your function with ‘./words.txt’ which is a file that exists, and then again with the name of a file that does not exist.
Submit a link to your completed REPL