Sheet: 330 bytes. Using a single function with a for(i in e)

A single function with a for(i in e) instead of 3 functions and a forEach