I'd like to use the math.round() method in a Do JavaScript action, how do I do this?

80 views
Skip to first unread message

Richard Haynes

unread,
Oct 13, 2013, 10:39:55 PM10/13/13
to fak...@googlegroups.com
I'm trying to get the following to run in a Do JavaScript action:

var TestN = 100.1;
console.log(TestN);
eToolTest = math.round(TestN);
console.log(eToolTest);

It's failing due ot the math.round() method.  I'm guessing I need to load up an extra js library to call the math object.  If anybody knows how to do this I would be very grateful.  I'm guessing this is much more of a JS question than a fake question.  Sorry about that, I've done my best trying to find a solution on the net without luck.

Thanks,

Richard

Todd Ditchendorf

unread,
Oct 13, 2013, 11:00:36 PM10/13/13
to Fake
Hi Richard,

I believe that's

    Math.round()

note the capitalization. 


TD




--
You received this message because you are subscribed to the Google Groups "Fake" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fakeapp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Richard Haynes

unread,
Oct 14, 2013, 3:07:38 AM10/14/13
to fak...@googlegroups.com
Hi TD,

Thanks so much, you're a legend.  FakeApp is great too, love it.  

Rich
Reply all
Reply to author
Forward
0 new messages