# + ?

**URL:** <https://forum.kirupa.com/t/topic/17790>\
**Category:** Uncategorized\
**Created:** [April 9, 2003, 8:22am UTC](https://forum.kirupa.com/t/topic/17790 "2003-04-09T08:22:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Idan](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@Idan](https://forum.kirupa.com/u/Idan)\
**Post date:** [April 9, 2003, 8:22am UTC](https://forum.kirupa.com/t/topic/17790/1 "2003-04-09T08:22:06Z")

</div>

👁 hiii

When I write a simple code like

a = b-1;

It’s work, but when I wrote

a = b+1;

the 1 added near to the b…

For exaample:  
if a = 10 then b =11…

What I need to write for get the + value?  
Thanks!:battery:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 10:12am UTC](https://forum.kirupa.com/t/topic/17790/2 "2003-04-09T10:12:11Z")

</div>

wait what do you mean? do you mean the b+1 doesnt’ work? If thats whats wrong then i don’t know whats wrong ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 12:03pm UTC](https://forum.kirupa.com/t/topic/17790/3 "2003-04-09T12:03:58Z")

</div>

No, instead to do b+1 it’s do b and 1

if b =10  
it do b+1= [COLOR=blue]10[/COLOR]1

Here file with the problem:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 12:23pm UTC](https://forum.kirupa.com/t/topic/17790/4 "2003-04-09T12:23:59Z")

</div>

thats only if b is a string. the + operator is the addition operator for numbers and the concat for strings. So if you have a ‘number’ thats actually a string, you’ll have to convert it to a number if you want to add its number value to another number ie

newVal = number(b) + 1

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 9, 2003, 12:26pm UTC](https://forum.kirupa.com/t/topic/17790/5 "2003-04-09T12:26:26Z")

</div>

Work!  
thanks! C:-)
