Twitch tv getJson question

Hello everyone~
I had been stuck with this twich TV project for a long time and since then I kind of gave up for few months and just come back two weeks ago trying to finish it.

I am trying to do the twitch project now and I have a small question regarding the code I saw from some people.

var channels = [“freecodecamp”,“test_channel”,“ESL_SC2”];

function getChannelInfo() {
channels.forEach(function(channel) {
function makeURL(type, name) {
return ‘’ + type + ‘/’ + name + ‘?callback=?’;
$.getJSON(makeURL(“streams”, channel), function(data) {
var game,
if ( === null) {
game = “Offline”;
status = “offline”;
} else if ( === undefined) {
game = “Account Closed”;
status = “offline”;
} else {
game =;
status = “online”;
$.getJSON(makeURL(“channels”, channel), function(data) {
var logo = data.logo != null ? data.logo : “”,

My question is that is the ‘streams’ from this code '$.getJSON(makeURL(“streams”, channel), function(data) {}'
just a random name? It can be any name you want??
and does the “channels” of this second getJson ‘$.getJSON(makeURL(“channels”, channel), function(data) {}’ means the var channels = [“freecodecamp”,“test_channel”,“ESL_SC2”];???
If so, where is the “streams” of first getJson from??

Thanks in advance!