I was messing around with some split strings operations.
It occurred to me that by doing that it returns a string
var name = 'aaaa bbbb cccc'.split();
console.log(name)
console.log(typeof name)
However, this returns an array:
console.log('aaaa bbbb cccc'.split());
console.log(typeof 'aaaa bbbb cccc'.split())
Am I missing something? I did not find anything else on the MDN documentation (didn’t bother looking RFC) and I don’t know what is happening.
Anyone could help me here?