Examples of unexpected behaviour in JavaScript