I have recently started learning coding and am trying to learn how to create functions but I am finding it quite difficult.
How would write a function called countDots(x) that takes a string as an argument and returns the number of dots (.) it contains.E.g. x = "www.google.com" the function will return with 2.