Tag Archives: learn swift

self keyword swift simple example – what is use ?

Use of self keyword swift simple example One of the use of “self” keyword in swift is when you want refer a property within structure, class or enum. We can understand by the following example:

when we call function and within its definition if there’s written x+2 then it will refer to the x… Read More »