We are more than willing to help out but we will not write your code for you. We expect to see you make at least a token effort.
Instead of "looking online" for solutions, learn the language - there are plenty of free resources available e.g.
learn javascript online - Google Search[
^]
Do some study, give it a try then come back if you are still struggling