Inheritance
Inheritance is a concept of abject oriented programing. With this concept, we can
base a function or class to a new class
class person {
constructor(name, weight) {
this.name = name;
this.weight = weight;
}
In the above code we declared a class of a person that takes persons name and weight as argument. And gives name and weight as value. To implement this in inheritance we need to call the function with the name and value of weight as a parameter of the class. We can create multiple objects from this one constructor.
To initiate the constructor
const person = new person('George', '160Kg');
With the help of inheritance, we can create multiple objects from a single class in javascript.
This Keyword
is a keyword of function that indicates the function where it was declared. This keyword indicates the global object.
The syntax is
“ This “
Example:
Function Func(){this.console.log('This Keyword")}:
The above code prints “this Keyword” from the func function.
DOM
The Full meaning of DOM is the document object model. DOm basically means javascript to interact with HTML documents. with the help o dom-manipulation user, interactive websites can be created. There are a few Built-in Syntax for javascript DOM manipulation.
Document.inner HTML
Document.Inner text
Document. Style
Add event listener
With the help of document. inner HTML we can set HTML code to create a new section or element with javascript. With inner text, we can change the inner value of any Html element.
And with event listener, we add Events to the HTML document to interact with users for this page. Interaction such as onclick, hover and many more.
Fetch
Fetch is a javascript method that makes HTTP requests from the server and loads needed data from the server to document.
API
Full form of API stands for Application Programming Interface. Fetch uses API to make HTTP requests API is like a messenger to the back end and front. Api interacts with the database and gives the required data is needed t perform any operation, its popular lightweight way of transferring data
What is Postman is a Client tool to work with APIs
to send requests to get responses.
Header: exists in both request and response,
is metadata about the request.
Content-Type: in the request header: to specify what kind of data
we are sending to the server
in response header: what was the content type we got a response
Top comments (0)