0
我看着下面的代碼在https://github.com/JosephRobertBrown/HackReactorApplication/blob/master/TakeHomeProject/s.jsjavascript/jquery中.results函數和.result函數的區別?
明確本節中,
Chat.fetch = function(callback){
$.ajax({
url: "https://api.parse.com/1/classes/chats?order=-createdAt",
success: function(responseData){
var messageList = [];
var responseMessages = responseData.results;
for (var i = 0; i < 10; i++) {
messageList.push(responseMessages[i].text);
};
//Newest message is at index 0. Reverse message list to add newest messages to the bottom.
callback(messageList.reverse());
}
});
};
我想知道是否有人能告訴我這是什麼。結果功能呢?我已經嘗試使用Google搜索,甚至查看jQuery api文檔,只能找到.result函數。
「event.result」=由該事件觸發的事件處理程序返回的最後一個值,除非該值未定義。
這是.result和.results一樣嗎?
謝謝
謝謝!在閱讀你的答案後,我明白了。我查看了PARSE REST的API文檔,並發現它 – JaTo