nilproject / NiL.JS

JavaScript engine for .NET written in C#.
BSD 3-Clause "New" or "Revised" License
333 stars 46 forks source link

TypeError: flat is not a function #275

Open savissimo opened 2 years ago

savissimo commented 2 years ago

If I try to run [ 1, 2, [ 3, 4 ] ].flat(), I get JSException: TypeError: [1, 2, [3, 4]].flat is not a function.

flat is a standard function of arrays. I haven't tested extensively for other array functions, but I can confirm that find, filter and map all work.

savissimo commented 2 years ago

Probably only loosely-related: it seems that reduce and some don't work as expected. I'll try to isolate some tests.

savissimo commented 2 years ago

Probably only loosely-related: it seems that reduce and some don't work as expected. I'll try to isolate some tests.

Forget that. It seems that my other problem was caused by passing a complex object into JavaScript. I'll open a separate issue for that.