Do you support Math.round() for function node?

Hi, I have a question:
I read in w3schools have Math.round();
Do you support this for function node?

Hi @cmdntd987, sure you can try it out by pasting this into the Function node:

items[0].json.myVariable = Math.round(10.99);
return items;

The output should look like the following image after clicking on the Execute Node button.

Hope that helps. Have fun! :slight_smile:

1 Like

What if I want to add it to a node ? [“numbers”].round()?


Also that can be tested easily exactly the same eway as @tanay explained above.

The result would be that it is not possible.