1) No it doesn't. The things defined in the Triangle() function are applied
after the changes to the prototype object. It's a little bit confusing because the code is arranged the way it is, but keep in mind that changes to the prototype take effect immediately while changes inside of a function take effect only when the function is called.
2) This will assign sides to be equal to undefined. You don't want to pass in any default values because you want your constructor, Triangle, to supply them.
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/