Beginning tvOS Development - Can't find variable: createAlert

Following this tutorial Beginning tvOS Development with TVML Tutorial after changing the application.js I got the following error:

2016-03-02 21:11:37.129 RWDevCon[85625:3944543] ITML : Can’t find variable: createAlert - http://localhost:9001/js/application.js - line:9:30

I looked for the solutions on the forum at the end of the tutorial but could not find the solution.

I figured it out.
In the section Fleshing out the JavaScript Client of the tutorial the instruction is:

Replace the current implementation of App.onLaunch with the following:, this is correct but leads the user to accidentally delete the entire application.js code. The correct is to leave the createAlert function and not replace it.
The code should be like this :

App.onLaunch = function(options) {
// 1
var javascriptFiles = [
// 2
evaluateScripts(javascriptFiles, function(success) {
if(success) {
var alert = createAlert(“Hello World!”, “”);
} else {
// 3 Handle the error CHALLENGE!//inside else statement of evaluateScripts.
/ Leave createAlert alone
var createAlert = function(title, description) {
var alertString = <?xml version="1.0" encoding="UTF-8" ?> <document> <alertTemplate> <title>${title}</title> <description>${description}</description> </alertTemplate> </document>
var parser = new DOMParser();
var alertDoc = parser.parseFromString(alertString, “application/xml”);
return alertDoc