Tp fix all javascript

Space needed between if and condition. Also between for and condition.