emma h
Posts: 0
Joined: Wed Nov 20, 2013 6:54 pm

Coding Problem Using Script

What is wrong with this coding:
Script Mad Lib: ReferenceError: noun1 is not defined ( @ 19 : 68 ) - cles as well as " + verb + " . This increases that rate of your " + noun1 + "

Here is my entire coding:

// get name from service, name is entered in the app
var adjective = request.get("verbing");
var vegetable = request.get("adjective");
var verb = request.get("noun");
var adjective2 = request.get("verb");
var vegetable = request.get("noun1");

var verbing = request.get("noun2");
var verbing1 = request.get("animal");
var noun = request.get("noun3");

var adjective3 = request.get("verb1");
var number = request.get("adjective1");
var verb2 = request.get("color");

// put together the mad lib string
var greetingString = " Most doctors agree that bicyle " + verbing + " is a" + adjective + " form of excerise. Using a bicyle enables you to develop your " + noun + " musc cles as well as " + verb + " . This increases that rate of your " + noun1 + " beat. More " + noun2 + " drive " + animal + ". No matter what kind of " + noun3 + " you " + verb1 + ", always be sure to wear a " + adjective1 + " helmet. Make sure to have " + color + " reflectors too! ";

// format as JSON and return the response
response.success(JSON.stringify({
greeting: greetingString
}), "application/json");

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Coding Problem Using Script

Hello! Could you provide more details? Where are you running this code and what are you trying to achieve?

emma h
Posts: 0
Joined: Wed Nov 20, 2013 6:54 pm

Coding Problem Using Script

i am running this code out of a mad lib script i created under the server code tab. I am trying to make an app where when you type a word into an input it will appear in a paragraph i had previously created.

emma h
Posts: 0
Joined: Wed Nov 20, 2013 6:54 pm

Coding Problem Using Script

i am actually all set thank you!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Coding Problem Using Script

Emma,

Thank you for the update! Are there any other issues?

Return to “Issues”