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

Delphi change the assembly code of a running process -

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

C++ 11 "class" keyword -