Function invocation for a random category pickup [solved]

I need a help for educational task.
I just have started JS learning and my knowledge is not sufficient for such task..
The problem: what may I pass into chooseRandomCategory() function (STEP 2) for HTML-page generating with random Category?
Please, give me advice how to solve it.

// TODO: STEP 0: Look over the code from
// *** start ***
// to
// *** finish ***
// below.
// We changed this code to retrieve all categories from the server instead of
// simply requesting home HTML snippet. We now also have another function
// called buildAndShowHomeHTML that will receive all the categories from the server
// and process them: choose random category, retrieve home HTML snippet, insert that
// random category into the home HTML snippet, and then insert that snippet into our
// main page (index.html).
//
// TODO: STEP 1: Substitute [...] below with the *value* of the function buildAndShowHomeHTML,
// so it can be called when server responds with the categories data.

// TODO: STEP 3: Substitute {{randomCategoryShortName}} in the home html snippet with the
// chosen category from STEP 2. Use existing insertProperty function for that purpose.
// Look through this code for an example of how to do use the insertProperty function.
// WARNING! You are inserting something that will have to result in a valid Javascript
// syntax because the substitution of {{randomCategoryShortName}} becomes an argument
// being passed into the $dc.loadMenuItems function. Think about what that argument needs
// to look like. For example, a valid call would look something like this:
// $dc.loadMenuItems('L')
// Hint: you need to surround the chosen category short name with something before inserting
// it into the home html snippet.
//

// TODO: STEP 2: Here, call chooseRandomCategory, passing it retrieved 'categories'
// Pay attention to what type of data that function returns vs what the chosenCategoryShortName
// variable's name implies it expects.
var chosenCategoryShortName = chooseRandomCategory(categories);
// TODO: STEP 3: Substitute {{randomCategoryShortName}} in the home html snippet with the
// chosen category from STEP 2. Use existing insertProperty function for that purpose.
// Look through this code for an example of how to do use the insertProperty function.
// WARNING! You are inserting something that will have to result in a valid Javascript
// syntax because the substitution of {{randomCategoryShortName}} becomes an argument
// being passed into the $dc.loadMenuItems function. Think about what that argument needs
// to look like. For example, a valid call would look something like this:
// $dc.loadMenuItems('L')
// Hint: you need to surround the chosen category short name with something before inserting
// it into the home html snippet.
//
var homeHtmlToInsertIntoMainPage = insertProperty(homeHtml, "randomCategoryShortName", "'" + chosenCategoryShortName.short_name + "'");