Letter Lookup explainer

Aim of the puzzle: Write a function that takes a string and an object map of a string, and returns true if all of the letters of the string exist in the object, or false if they do not.
Walk through of solution: In a later puzzle, you will write a function that checks if a string is a subsequence of another string. For now, write a function that simply checks if all of the letters in one string exist in the other.

In the last puzzle, you wrote a function that turns a string into an object map. The output of that function will be used as input for this function.

To start, add a for loop to iterate through the input string. For example:

for (let letter of word) {

}

Then, add an if else statement that checks if a property with the name of the current character exists in the map. If a letter is found, the function does not need to do anything, but if the letter is not found, the function should return false. It should look something like this:

for (let letter of word) {
 if (map[letter] {
  
  } else {
    return false;
  }
}

At the end of the function, return true.

return true;

This line of code will only run if the function iterates through the entire string without returning false for any of the letters.
Javascript Concepts: Functions, Objects, Strings, Properties, For Loops, If Statements, Bracket Notation, Truthy and Falsy