#20 Increment/Decrement Properties


Ember.Object has 2 helpful functions for working with integer properties.  You can increment a property with

That will increase the value of age by one.  You can also increment by a custom number e.g.

person.incrementProperty(‘age’, 5);

To decrement, simply use


This is a lot nicer than

Some Love ❤❤❤

If you are enjoying my daily tips please spread the word with this one-click tweet.
If you do NOT like the tips then please reply to this email and let me know.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu