The semantics of JavaScript in K