Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Making Decisions with Conditional Statements Introducing Conditional Statements

Christopher Bate
Christopher Bate
4,736 Points

In JavaScript why is document.write in lowecase, but Math.round starts with an uppercase?

g

2 Answers

Ioannis Leontiadis
Ioannis Leontiadis
9,828 Points

Hello Christopher,

naming conventions are conventions meaning they do have some semantic value but are not as strict as a language specification.

There is a similar question on stackoverlow and a more detailed style guide by google.

Feel free to check them out !

Alsus Sy
Alsus Sy
2,320 Points

Math.round() was a built-in object function of javascript.

ian izaguirre
ian izaguirre
3,220 Points

Not sure if his question had more info before it was edited to have only the text "g", if it was then disregard this reply. I am not sure if your response was meant to indicate that "only" Math.round was a built in object? Because both "document.write" & "Math.round" are built in objects:

document.write is a built in object part of the Document Object Model.

Math.round is a built in object part of the Global Javascript Objects.