I am using any
instead of its data-type (String or Array).
just like this:
token: any
Instead of
token: String
Can anyone tell me what is the difference between both and which is best to use data-type
or any
?
I am using any
instead of its data-type (String or Array).
just like this:
token: any
Instead of
token: String
Can anyone tell me what is the difference between both and which is best to use data-type
or any
?
The only difference is that if you use token: any
, you don't get the benefit of type checking that helps you debug your code and prevents you from doing things like assigning a number to your token: String
.