Espruino/tests/test_string_maths.js
Gordon Williams 61db050360 'Consting' some string functions
Fixing arrays with string indices that are actually numbers \o/ (fix #19)
2013-10-18 10:38:24 +01:00

12 lines
185 B
JavaScript

// maths with strings - https://github.com/espruino/Espruino/issues/90
var a = [
"1234"*1,
"1234"/1,
"1234"-0,
];
var r=1;
a.forEach(function (a) { if (a!=1234) r=0; });
result=r;