title: Parameter in Parse Cloud Success function:
body: <p>Here are three separated examples in Parse cloud Code guide: My question is about the "success" in the three examples: The parameters of these two success function, "list", "object" and "results": I didn't find them in the rest of the code. How they been passed to the function? Are they newly created variables? How does the success function work? (I am new to JavaScript)    </p>
  
  <pre><code> var query = relation.query();
   query.equalTo("title", "I'm Hungry");
   query.find({
      success:function(list) {
   }
   });
  
  
  var GameScore = Parse.Object.extend("GameScore");
  var query = new Parse.Query(GameScore);
  query.equalTo("playerEmail", "dstemkoski@example.com");
  query.first({
     success: function(object) {
     // Successfully retrieved the object.
   },
      error: function(error) {
  alert("Error: " + error.code + " " + error.message);
   }
  });
  
  
  var GameScore = Parse.Object.extend("GameScore");
  var query = new Parse.Query(GameScore);
  query.equalTo("playerName", "Dan Stemkoski");
  query.find({
     success: function(results) {
        alert("Successfully retrieved " + results.length + " scores.");
        // Do something with the returned Parse.Object values
     for (var i = 0; i &lt; results.length; i++) { 
        var object = results[i];
        alert(object.id + ' - ' + object.get('playerName'));
     }
   },
   error: function(error) {
     alert("Error: " + error.code + " " + error.message);
   }
  });
  </code></pre>