MaxArt 918 days ago. link 2 points ▲ ▼This isn't a JavaScript project, nor JavaScript is mentioned anywhere. Off topic.
MaxArt 925 days ago. link 1 point ▲ ▼This is off topic. Anyway, the given code *does* render a perfectly centered button. Use button.getBoundingClientRect() to verify that.
MaxArt 928 days ago. link 1 point ▲ ▼Small correction: // 3 * obj.nonexistentProperty === undefined It's actually === NaN.
Small correction: // 3 * obj.nonexistentProperty === undefined It's actually === NaN.