JavaScript
We’ll cover the fundamentals of JavaScript in this post…
Introduction
JavaScript was first used in the Netscape Navigator browser in 1995 to add applications to websites. All other graphical web browsers have since embraced it.
what is JavaScript?
JavaScript is a scripting language that is portable, cross-platform, and interpretable.
why JavaScript?
It is used to make websites more interactive, and it is also utilized in various non-browser situations. JavaScript may be used for both client-side and server-side programming.
Client-side :- It provides objects for controlling a browser as well as its Document Object Model. Client-side extensions, for example, allow an application to add items on an HTML form and respond to user actions like mouse clicks, form input, and page navigation.
Server-side :- It provides items required for executing JavaScript on a server. As an example, server-side extensions may enable an application to interface with a database, give information continuity from one program invocation to the next, or conduct file operations on a server.
Get Kathir’s stories in your inbox
Join Medium for free to get updates from this writer.
JavaScript is classified as a single-threaded programming language. It is a dynamically typed language. It establishes variable types, ordering, and so forth at runtime.
object
A collection of key-value pairs known as properties constitutes an object. The key of a property is a string or the property name, and the value is anything. Unlike objects in other object-oriented programming languages such as Java, JavaScript objects are extremely malleable. In JavaScript, an object is a non-primitive, organized data type. Objects are similar to variables in JavaScript, with the exception that an object can have numerous values in terms of properties and methods. In JavaScript, there are several methods for creating an object. However, the simplest and most common methods are as follows:
The value of a property can also be a function. A method is a property like this:
Both the dot (.) notation and the square bracket ([]) notation are used to access property values:
Prototype
what is prototype?
JavaScript objects inherit properties from one another through the use of prototypes. We may add new features and methods to existing object constructors using the prototype property. Instead of having one instance of the object, the additional attributes are shared by all instances of the given type.
why prototype?
Prototypes make it simple to design methods that apply to all instances of a specific object. The method is applied to the prototype, thus it is only saved in memory once, but it is accessible to all instances of the object.
The prototype property of a function may be retrieved by using function-name>. prototype. Therefore, an object (instance) does not expose the prototype property; alternatively, it may be accessed through __proto__.
The prototype property is a specific form of countable object that cannot be iterated over using the for..in or foreach loops.
Classes
Classes serve as a starting point for the creation of things. They wrap data with code that allows them to operate with it. In the object-oriented programming, a class is a blueprint for constructing objects with attributes and functions while hiding implementation details from the user. However, the idea of genuine classes does not exist in JavaScript.
Conclusion
We’ve gone through the fundamentals of JavaScript as well as their most prevalent principles through code examples. This information will be useful in the future to comprehend JavaScript frameworks. Thank you very much for reading my essay, and I hope it has given you some new ideas.







