Added js reverse foreach