Brief explanation about some terms
Method: A method is a function that is associated with an object in JavaScript. Methods can be used to perform actions on the object or retrieve information from the object. For example, the
getElementByIdmethod is a method that is associated with thedocumentobject and is used to retrieve an HTML element from the DOM.Element: An element is an object in the DOM that represents an HTML tag. Elements can have properties (such as
textContentandclassName) and can be modified using methods (such assetAttributeandappendChild). Examples of elements include<div>,<p>, and<img>tags.Properties: In JavaScript, properties are values associated with an object. Elements in the DOM are objects and have properties such as
textContent,className, andid. Properties can be accessed and modified using dot notation, such aselement.textContent = 'Hello World';.Attribute: An attribute is a value that is associated with an HTML tag. Attributes are used to provide additional information about an element, such as the
srcattribute on an<img>tag. Attributes can be accessed and modified using methods such asgetAttributeandsetAttribute.
Last updated