JavaScript: Assertion