摘要: function buildCoveTicketMarker(transport){ var passengerNumber = 0; return function(name){ passengerNumber++; alert("Ticket via the " +transport+ "Wel 阅读全文
posted @ 2014-08-04 20:15 Zhentiw 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Returning a function from a function, complete with variables from an external scope, is called a closure. The entire contents of one of these inner f 阅读全文
posted @ 2014-08-04 18:33 Zhentiw 阅读(467) 评论(0) 推荐(0) 编辑
摘要: It's finally time to start building out our Appointment app. We're going to be using a collection and a collection view to display a list of appointme 阅读全文
posted @ 2014-08-04 05:13 Zhentiw 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Define a collection: var AppointmentList = Backbone.Collection.extend({model: Appointment}); RESET the json: var appointments = new AppointmentList(); 阅读全文
posted @ 2014-08-02 21:28 Zhentiw 阅读(149) 评论(0) 推荐(0) 编辑
摘要: The Poplar Puzzle-makers weren’t too impressed. They barely noticed your simple and beautiful array of functions, and were only sort of “meh” on the u 阅读全文
posted @ 2014-08-02 20:52 Zhentiw 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Now the people at Poplar Puzzles would like you to treat an array of functions like a Queue, passing the result of each function into the next until t 阅读全文
posted @ 2014-08-02 20:29 Zhentiw 阅读(153) 评论(0) 推荐(0) 编辑
摘要: var parkRides = [["Birch Bumpers", 40], ["Pines Plunge", 55], ["Cedar Coaster", 20], ["Ferris Wheel of Firs". 90]]; var fastPassQueus = ["Cedar Coaste 阅读全文
posted @ 2014-08-02 19:50 Zhentiw 阅读(212) 评论(0) 推荐(0) 编辑
摘要: As an example, if Jason was riding the roller coaster (and when isn’t he), your goal would be to change his cell from ["Jason", "Millhouse"] to just " 阅读全文
posted @ 2014-08-02 18:00 Zhentiw 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Inside the Haunted Hickory House file, developers for the Forest of Function Expressions Theme Park have created a declared function called forestFrig 阅读全文
posted @ 2014-08-02 17:23 Zhentiw 阅读(196) 评论(0) 推荐(0) 编辑
摘要: //This will load the code into the memory no matter //you call it or not function diffOfSquares(a,b){ return a*a -b*b; } //This code will only load in 阅读全文
posted @ 2014-08-02 16:37 Zhentiw 阅读(193) 评论(0) 推荐(0) 编辑