Sum an Array in Javascript with reduce

Опубликовано: 16 Август 2023
на канале: Dev Leonardo
331
15

My ways to sum an array, you can use a for loop but you need a variable for that.

If you want a const, you can use array.reduce!

More on the docs: https://developer.mozilla.org/en-US/d...

_______________________________
Hit like and subscribe for more content! :D
Join the Discord community! Here's the invite:   / discord  

You can also follow me on the other platforms:
Twitter:   / balastrong  
dev.to: https://dev.to/balastrong
Home: https://leonardomontini.dev/
TikTok:   / balastrong  
GitHub: https://github.com/Balastrong
Instagram:   / devbalastrong  
_______________________________

Sound effects from https://www.zapsplat.com