js assignment

Final refining done
merge these three lines, you are creating variables which are not used any where except in the 3rd line