In javascript i want to preserve my angle addition after 360 degrees to 360 + and not again from 0 degrees

While transform rotate in javascript whenever I add anything to 360 drgree, it again starts counting from 0 degree and my rotated div reverts backwards to 0 deg if I use transition. I want my rotation to continue in same direction. Please help