We have few techniques to iterate over the arrays, objects and strings.
Tested the each technique with 1 Million iterations and executed the test.js file for 5 times using the for i in {1..5}; node test.js; command.
Whileloop - 1.4msDo whileloop - 0.8msForloop - 0.8msFor Ofloop - 9.5msFor Inloop - 137msMapmethod - 8.5msFiltermethod - 7.2msReducemethod - 6.4msSortmethod - 11.7msEverymethod - 7.2msSomemethod - 6.8msChaining methods- 16.3ms