Assignment for milestone 3. problem & solving in java script by function with for-loop, if-else statement etc