| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Learn_web_development/Howto/Solve_JavaScript_problems | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
, , JavaScript .
/ , - , , , . .
, :
| Correct | Wrong |
|---|---|
getElementsByTagName() |
getElementbyTagName() |
getElementsByName() |
getElementByName() |
getElementsByClassName() |
getElementByClassName() |
getElementById() |
getElementsById() |
, . :
| Correct | Wrong |
|---|---|
elem.style.color = 'red'; |
elem.style.color = 'red;' |
, .
- , .
:
function myFunction() {
alert("This is my function.");
}
, ,
myFunction();
, functions have their own scope , , (. . - ), return the value .
, , JavaScript - return .
, (, Firefox) , return. Firefox .
- JavaScript, , :
var myNumber = 0;
Objects, - , , , , :
var myObject = {
name: "Chris",
age: 38,
};
For more information on JavaScript debugging, see Handling common JavaScript problems; also see Other common errors for a description of common errors.
this, in the context of an object?addEventListener() function do, and how do you use it?This page was last modified on 10 . 2026 . by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |