Greetings! I have a simple question. Reading some functions around the Internet, I found that there are some functions that have a return statement "return true;" (or "return false;") and there are others that have "return [true];" (or "return [false];"). Is there any difference between "return true;" and "return [true];"?
A simple question? Does that imply you're looking for a simple answer? The simple answer is "Yes".
However, since in real life the simplicity of a question is completely unrelated to the simplicity of its answer, I will give you the real answer.
The [] notation indicates that an array literal is being used. For example [true] represents an array with one element whose value is true. And since an array with one element whose value is true is different than the boolean value true, then the answer is "Yes, there is a difference".