What do the square brackets mean in $[5-(6-7(2-6)+2)]+4$? While watching a youtube video about a Simpsons math episode at 1:27 there's a puzzle that includes square brackets.
$$[5-(6-7(2-6)+2)]+4$$
Apparently the answer is $-27$ which I can't figure out how to arrive at that answer. I've Googled that the square brackets mean intervals. But then I don't understand the context of this question as surely an interval should be two numbers separated by a comma?
How do you arrive at $-27$?
 A: In this case, it is a matter of legibility; the square brackets are the same as round parentheses;
$$[5-(6-7(2-6)+2)]+4 = [5-(6-7(-4)+2)]+4 = [5-(6+(28)+2)]+4 = [5-(36)]+4 = [-31+4] = -27.$$
Note that there are instance where the square brackets do mean something different like nearest integer function.

Addendum:
I neglected to address your other concern.
Yes, interval notation must contain a comma;
for example, if $a,b\in \mathbb R$, then
$$[a,b] = \{x\in \mathbb R:a\leq x\leq b\}.$$ 
A: It’s just a parenthesis; the use of square brackets instead of round is to make it easier to match up corresponding left and right brackets.
$$\begin{align*}
[5-(6-7(2-6)+2)]+4&=[5-(6-7(-4)+2)]+4\\
&=[5-(6-(-28)+2)]+4\\
&=[5-(6+28+2)]+4\\
&=[5-36]+4\\
&=-31+4\\
&=-27
\end{align*}$$
A: This is simple arithmetic. The square brackets here just indicate that the expressions inside them must be evaluated first.
$$[5-(6-7(2-6)+2)]+4=[5-(6-7(-4)+2)]+4=[5-(6+28+2)]+4=[5-(36)]+4=[-31]+4=-27$$
A: The square brackets mean here just regular parentheses. To make it easily readable the outer parentheses sometimes are substituted to square and the curly brackets. As for the result, start with innermost parentheses and you will get the desired answer.
A: Square brackets in this context mean the same thing as round parentheses. Would it help you if it was written as $$\left(5-(6-7(2-6)+2)\right)+4=5-(6+28+2)+4=5-36+4=-27$$
You can probably see why they are used from this; as too many $\color{red}{(}$'s make the expression unclear and therefore harder to process. So the $\color{blue}{[}$'s are used.
Or if you really prefer the round parentheses you can just make them larger:
$$\bigg(5-\Big(6-7(2-6)+2\Big)\bigg)+4=5-(6+28+2)+4=5-36+4=-27$$ Start by computing the inner-most (smallest) bracket and work your way outwards.

The other context apart from intervals as you mentioned in your post; like for some $x$ $$[0,1]\implies 0\le x \le 1$$ is that the square brackets are used to return the dimensionality of some formula eg. $$\begin{align}[\text{Speed}]=\mathrm{ms}^{-1}\ & =\quad\text{meters per second}\end{align}$$ 
A: $$[5-(6-7(-4)+2)]+4 \implies [5-(6+28+2)] + 4 \implies [5-36] +4 \implies -27$$
A: Here square brackets means parentheses but not interval. While solving these type of questions first solve the expression in ( ) next solve the expression in flower bracket i.e. { } next sole the expression on square brackets i.e. [ ]. Please don't take [.] as greatest integer function. In this problem we must start computing from inner most bracket to outwards.
$$[5-(6-7(2-6)+2)]+4$$
$$=[5-(6+28+2)]+4$$
$$=[5-36]+4$$
$$=-31+4$$
$$=-27$$
