I am working my way through the TwitchTV project, and I am having some inconsistent returns for user online status. I apologize if this topic has already been covered, but I could not find anything on it. Here is my issue.
I have created a function to return the user’s status as “Online” or “Offline”. When I console.log the function results, the returned result is accurate. However, I need to run those results in a different function, so I created a variable to equal the results and use in the second function. My problem is that this variable is not always returning accurate results. Why would the variable results differ from the function results when they are set to equal one another?
I have noted the areas of the function and variable. Thank you in advance