Hi
I’m wondering why Math.trunc(x) does not work in AppLab?
For example:
var x = 2.2;
//x = Math.round(x);
x = Math.trunc(x);
console.log(x);
Math.round works but Math.trunc does not work
Thanks
Hi
I’m wondering why Math.trunc(x) does not work in AppLab?
For example:
var x = 2.2;
//x = Math.round(x);
x = Math.trunc(x);
console.log(x);
Math.round works but Math.trunc does not work
Thanks
I dont think it is supported on AppLab. I don’t see it in the documentation. https://docs.code.org/applab/
Where can I request that AppLab add Math.trunc into the pool of commands?
Thoughts?
Try support@code.org!
Thank you so much. Peace
Math.floor(num) works for me! Not in the docs, but a vanilla javascript function.