As you can see, the syntax used is very similar to JavaScript , the main difference being the declaration of arguments and return types in Swift, since it is a static typed language. There are few other special variations of functions in Swift also, which we’ll look at in a separate blog.