The problem is that particular w3schools page does not indicate that, they simply state that they are the same, without even slightly mentioning that it's because they are not in a function. My article shows off this difference. In short the page is misleading, because it doesn't state that the two are only interchangeable in those two examples, but not in in every situation.