Add forEach loop to magic.js
Update magic.js