Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
74
rated 0 times [  80] [ 6]  / answers: 1 / hits: 17023  / 6 Years ago, tue, october 30, 2018, 12:00:00

Given is the following js command:



[].flat;


Executing it in a browser (chrome/firefox): returns function



Executing it with nodejs v10.13.0: returns undefined



Now I am wondering what other methods are not in the node RTE and where the documentation of global Objects like Array is.



Seems to be the same with Array.prototype.flatMap.


More From » arrays

 Answers
303

You'll need node 11 or higher for Array.prototype.flat. MDN is a great resource both for learning about Javascript and as a reference. You will find information about usage, browser compatibility, and even polyfills there.



As for Node.js support of ES6+, the best resource is node.green with a very detailed and up to date list of supported features by node version.


[#53208] Saturday, October 27, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rafael

Total Points: 5
Total Questions: 103
Total Answers: 103

Location: Guernsey
Member since Tue, Jul 6, 2021
3 Years ago
;