Skip to content

I don't really understand the "this keyword" #10521

Discussion options

You must be logged in to vote

@FernandoGonzalezHomerti in template you use just the name of the variable/computed/method. Inside of the script tag you use this keyword

Can we call the variables in all places without this.? -- No. Calling method/variable inside of script tag would result in error. You can use variables/methods/computed inside of the template without this keyword

Or there is any specific case that is MANDATORY to use this. to access to a variable or method? -- Yes, use this keyword inside of script tag

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by FernandoGonzalezHomerti
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Dimas-e63s
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants