In Javascript, we can call methods on string literals directly without enclosing it within round brackets. But not for other types such as numbers, or functions. It is a syn
The lexer is expecting a decimal value when it sees a number immediately proceeded by a period. Though you could get "creative" and put a space between the number, as in 7 .alert() but people would probably hunt you down for it when they get stuck maintaining your code!