-
Is that a normal Bracket or something else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello @Ashinthya This is a function, a function is a portion of code contained on a space and it could be used as many times as you want, the function syntax is as follows
where function: is a keyword |
Beta Was this translation helpful? Give feedback.
-
Parentheses are smooth and curved ( ), brackets are square [ ], and braces are curly { }. |
Beta Was this translation helpful? Give feedback.
Hello @Ashinthya
I don't know what you mean with "normal" but as you are new on coding let me give you a hand explaining the syntax here
This is a function, a function is a portion of code contained on a space and it could be used as many times as you want, the function syntax is as follows
function name(type _varName) public {}
where
function: is a keyword
name: is the name you want to give to the function
(): the brackets helps to know that is a function and also inside of them you set up the input parameters
type: the data type you want to use, for example uint, bool, string... etc.
_varName: the name you want to give to that input variable.
public: is the visibility this could be priv…