10 most important questions of JavaScript.

#01. What is javascript?

JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages. It can update and change both HTML and CSS. It also called a scripting language.

#02. What is OOP?

OOP means Object-Oriented Program. It’s a convention of writing code. It makes the code more organized. It helps the developer by allowing for code to be easily reused by other parts of the program or even by other people.

#03. What is encapsulation?

Encapsulation means information hiding. It’s a process of binding the data with the functions which act upon the data. Encapsulation allows us to control and validate the data.

#04. Null vs Undefined

‘null’ means nothing but in JavaScript ‘null’ is an object. It's an assignment value and it allows to assign it to a variable. It’s an empty or non-existent value and must be assigned.

‘undefined’ means a value hasn’t even been assigned yet. In JavaScript, if you declare a variable without assigning a value then the result will be shown as undefined.

#05. ‘==’ vs ‘===’

  • It’s used for comparing two variables, but it ignores the data type of the variable.
  • Return true if the two operands are equal.
  • It’s used for comparing two variables, but this operator also checks data type and compares two values.
  • It returns true only if both values and data types are the same for the two variables.

#06. What is Closure?

Closure is one of the important concepts in JavaScript. Closure means that is a feature in JavaScript where an inner function has access to the outer function’s variables a scope chain.

There are three scope chains in closure:

  • access to its own scope.
  • access to the outer function’s variables.
  • access to the global variables.

#07. What is ‘this’ keyword?

In JavaScript ‘this’ keyword refers to the object it belongs to. In most cases, the value of ‘this’ is determined by how a function is called. It has different values depending on where it is used.

  • In a method, ‘this’ refers to the owner object.
  • In a function, ‘this’ refers to the global object.
  • In an event, ‘this’ refers to the element that received the event.

#08. What is DOM?

DOM means Document Object Model. It’s a programming interface for HTML and XML documents. It’s an object-oriented representation of the web page, which can be modified with the scripting language JavaScript. It also represents the page so that programs can change the document structure, style, and content.

#09. What is API?

API means Application Programming Interface. It’s a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices. Basically, an API specifies how software components should interact. API specifies how software components should interact.

#10. What is CURD?

CRUD is a programming concept denoting four basic actions (create, read, update, delete) that can be performed on a data source.

  • POST: Create action. Adds new data to the server. Using this type of request, you can, for example, add a new ticket to your inventory.
  • GET: Read action. Retrieves information (like a list of items). This is the most common type of request. Using it, we can get the data we are interested in from those that the API is ready to share.
  • PUT: Update action. Changes existing information. For example, using this type of request, it would be possible to change the color or value of an existing product.
  • DELETE: Delete action. Deletes existing information.

I'm a full stack web developer.