In most programming languages semicolon is separating statements.
It has the same meaning in nexl expressions allowing to evaluate independent
statements in a single expression.
Let's say we have the following JavaScript file:
fruits = ['Mango', 'Banana', 'MILK'];
person = {
name: 'John',
fruits: '${fruits}'
};
Here we need to remove a
'Milk' string from the
fruits array and then
to resolve a
person object which contains a reference to the
fruits
array.
I.e. we need to perform 2 independent actions in a single expression.
The following expression does that:
${fruits-MILK;person}