Skip to content

Lesson 3: 03:15:42 confusion with syntax #2860

Answered by othaime-en
3toe asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @3toe the line SimpleStorage simpleStorage = new SimpleStorage(); simply does what simpleStorage = new SimpleStorage(); does which creates a new instance of SimpleStorage. The only difference here is that we append the type SimpleStorage. This type is similar to how we write uint256 or int or bool. So answer your question, what SimpleStorage does in that line is specify the type of the contact instance we are creating

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@3toe
Comment options

Comment options

You must be logged in to vote
2 replies
@3toe
Comment options

@othaime-en
Comment options

Answer selected by 3toe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants