javascript - SyntaxError: Unexpected token -


i'm using parse.com build companion website 2 apps. i'm using express framework web framework. in code try run 3 parse queries in parallel , put them display information. since i'm quite new @ javascript, promises , express have problem syntax. can spot i'm sure stupid mistake.

app.get('/', function (req, res) {      var querydining = new parse.query("location").equalto("locationtype", 0).adddescending("updatedat").limit(10).find();     var querymosque = new parse.query("location").equalto("locationtype", 1).adddescending("updatedat").limit(10).find();     var queryshops = new parse.query("location").equalto("locationtype", 2).adddescending("updatedat").limit(10).find();      // wait them complete using parse.promise.when()     // result order match order passed when()     parse.promise.when(querydining, querymosque, queryshops).then(function (restaurants, mosques, shops) {         res.render('pages/index', {             dininglocations: restaurants,             mosquelocations: mosques,             shoplocations: shops         });     }/*, function (error) {         //res.render('pages/index', {         //    dininglocations: [],         //    mosquelocations: [],         //    shoplocations: []         //});     }*/);  }); 

the error happens when call res.render

update error text

i2016-01-16t09:49:03.695z]syntaxerror: unexpected token .     @ object.function (<anonymous>)     @ exports.compile (ejs.js:256:12)     @ object.exports.render (ejs.js:295:10)     @ view.exports.renderfile [as engine] (ejs.js:325:22)     @ view.render (express_view.js:77:8)     @ function.app.render (express_application.js:516:10)     @ res.render (express_response.js:763:7)     @ app.js:25:13     @ e (parse.js:2:6545)     @ parse.js:2:5994 


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -