In programming, what is an expression? -


i've googled question, , searched on so, can't seem straight answer.

is question basic no-one has thought ask yet?

can please explain "expression" in programming.

also program in javascript, if definition varies in js please highlight difference?

in javascript:

"an expression valid unit of code resolves value.

conceptually, there 2 types of expressions: assign value variable , have value. expression x = 7 example of first type. expression uses = operator assign value 7 variable x. expression evaluates seven. code 3 + 4 example of second expression type. expression uses + operator add 3 , 4 without assigning result, seven, variable.

javascript has following expression categories:

arithmetic: evaluates number, example 3.14159. (generally uses arithmetic operators.) string: evaluates character string, example, "fred" or "234". (generally uses string operators.) logical: evaluates true or false. (often involves logical operators.) object: evaluates object. (see special operators various ones evaluate objects.)"

source: https://developer.mozilla.org/en-us/docs/web/javascript/guide/expressions_and_operators

here microsoft's explanation of expressions in .net


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -