this.error, however because you're using Array#forEach which accepts a callback function that returns void you're not actually returning this.error for the function chatInputRun but rather for the anonymous arrow function that is provided to Array#forEach. for...of instead.