Is there any specific reason for getting error on float and boolean variable.

Yes: Spread syntax (it isn't an operator) only works with iterable objects (objects that implement iteration). Numbers and booleans are not iterable. Things like arrays and maps and sets are iterable.

console.log(...aVal); asks the JavaScript engine to iterate through aVal and then call console.log with each iterated value as a discrete argument. That is, it asks javaScript to "spread out" that iterable.

Here's an example of spread with an iterable (in this case, an array):