Create a function that takes an array of strings and return the number of smiley faces contained within it. These are the components that make up a valid smiley:
: or ;.- or ~.) or D.No other characters are allowed except for those mentioned above.
countSmileys([":)", ";(", ";}", ":-D"]) ➞ 2
countSmileys([";D", ":-(", ":-)", ";~)"]) ➞ 3
countSmileys([";]", ":[", ";*", ":$", ";-D"]) ➞ 1
:) and :-) are both valid).