0
What is tokens in java?
Anybudy can explain In depth.
1 ответ
+ 2
Java or JavaScript? Because you're only doing the tutorial of the latter.
A token is a small part of your code that your programming language can identify as a unit.
For example if you write:
x+y
... your language understands that x, + and y are three separate units (tokens) while if you wrote:
x_plus_y
... that would be read as one token.
If there was this:
f(x)
... it would become the tokens f, (, x and ). If instead you wrote:
'f(x)'
... it would be just one token.
What's considered a token is different between languages. It is just about how the syntax of the language is defined.