meteor - How to decrement like $dec? -



meteor - How to decrement like $dec? -

in meteor leaderboard illustration there line:

players.update(session.get("selected_player"), {$inc: {score: 5}});

how can gracefully decrement same field? sadly, there no $dec.

increment -1?

$inc: {score: -1}

meteor

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -