JavaScript: Think like a browser