Twitch.api is asynchronous, the 2nd Twitch.api is called before the callback to your first one, which sets the value for streamerName
Twitch.api
streamerName