how to increment something by 1 in javascript code example Example: javascript increment x = 0; //pre-increment ++x; //post-increment x++;