Join the Webstudio community

Updated 6 days ago

Performing mathematical operations in the expression editor

Is it possible to do some mathematics in the expression editor? +1 adds the number 1 at the end instead of turning 485 into 486.
Attachment
image.png
B
R
4 comments
Yeah, there is old trick to cast string to number. Put plus before string like +"123"
Ohh I'm sorry, I asked this poorly. I meant:

/blog/485 turns into /blog/4851 when I say +1 currently in the expression editor, but I would like /blog/486
Ah got it, then just wrap (Artikel.data.results[0]+1) into parens
Awesome!! 🀩 Thank you so much 😁
Add a reply
Sign up and join the conversation on Discord