Question: Every 2 seconds, I want some content to change. At the moment, I have:

```
 setInterval(function() {
    $('.timer').text(3+3);
}, 2000);

```

However, it just replaces the current text of `.timer` with the number `6`. I want it to continue adding `3+3` to the existing number, so `6 + 3 + 3`.

[JSFIDDFLE](http://jsfiddle.net/tmyie/Xqnam/)

I'm using this as a learning exercise, so any additional help would be appreciated.

Answer: 
As `3 + 3 = 6`, that's no suprise, if you want strings, quote them

```
setInterval(function() {
    $('.timer').text(function(_, txt) {
        return txt + '3';
    });
}, 2000);

```

[**FIDDLE**](http://jsfiddle.net/Xqnam/1/)

**EDIT:**

If you're trying to add numbers, you can do:

```
setInterval(function() {
    $('.timer').text(function(_, txt) {
        return parseInt(txt,10) + 3;
    });
}, 400);

```

[**FIDDLE**](http://jsfiddle.net/Xqnam/2/)
As far as I took it you want to add 3 to existing content. Here's the way to go

```
setInterval(function() {
    var oldContent = parseInt($('.timer').text(), 10);
    $('.timer').text(oldContent + 3);
}, 2000);

```

[Fiidle](http://jsfiddle.net/ehteshamkafeel/Xqnam/4/)