add looping statements to js notes