Description
The in-line comment explains that if the term ends with a quotation then it should trim the term to remove the quotation. However, the second if-statement is written incorrectly and as a result, the code following the if-statement is unreachable.
Solution: "term.slice(term.length-1, 1)" should be changed to "term.slice(term.length-1, term.length)"