commenting functions and logical parts in js
done commenting & formatting js