I study learnyoumongo tutorials to learn mongoDB.
In the third exercise ( find ), I could not get it to work until I found a solution. My mistake was that the request needed a “+” before the argument.
therefore db.coll.find({ $gt: process.argv[2] })does not work, but { $gt: +process.argv[2] }did.
This may be a stupid question, but what is the plus sign, and when will I use it?
Also does it play a role in regular javascript?
source
share