Published
- 1 min read
array packing javascript
The solution for this is noted below
array packing javascript
Solution
function solution(a) {
return a.reduce((acc, cur, i) => acc + cur * 256 ** i)
}
Try other methods by searching on the site. That is if this doesn’t work