A
A
Alex2017-03-30 22:50:51
JavaScript
Alex, 2017-03-30 22:50:51

What is expression, literal and initialization in JavaScript??

Hey! I don't understand what is expression, literal and initialization. These words are used everywhere, but I just can't figure them out. String literal, numeric, boolean. Object initializers... I don't understand anything. Explain, please, on the fingers, what it all means. In my understanding, an expression is some kind of action, something that can be calculated. For example, a+b is an expression. A literal is some kind of value. Initialization is creation.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2017-03-30
@sergiks

Simply put, I would explain it like this:

L
Leo Developer, 2017-03-30
@crazy_leo

1) Expression - what is returned.
2) Literal - any value specified explicitly. For example, the number 120. You can write it as . That is, this is a simplified form of writing a value. 3) Initialization - creation. Before we created the variable, it did not exist, but we initialized it and it became. Something like this Number(120)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question