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$?
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\}.$$