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 trialChristopher Bate
4,736 PointsIn JavaScript why is document.write in lowecase, but Math.round starts with an uppercase?
g
2 Answers
Ioannis Leontiadis
9,828 PointsHello 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
2,320 PointsMath.round() was a built-in object function of javascript.
ian izaguirre
3,220 PointsNot 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.