[javascript] How does JavaScript .prototype work?