JavaScript is a dynamic, weakly typed programming language that is compiled at runtime. It can be executed as part of a webpage in a browser or directly on any machine (“host environment”).
JavaScript was created to make webpages more dynamic (e.g. change content on a page directly from inside the browser). Originally, it was called LiveScript but due to the popularity of Java, it was renamed to JavaScript.
In order to put this in perspective, we have to understand how webpages work and how Javascript comes into play in the process.
Visualize a user, such as yourself on your browser looking for something on the internet say this blog site. When the address of this website is typed into the address bar, a request known as an HTTP request is made to the server requesting the site(I won’t go into the intricacies of that for this article), and a page is sent back from the server and rendered to the user by the browser. Now, there are several actions a user can or might take on different websites that would require sending several of this HTTP request such as logging in, editing information, adding products to cart, etc. If all of these requests loaded a completely new page, it would have a negative impact on performance, and therefore; user experience. This is where Javascript comes in; it can send those requests and process the responses by taking actions with them such as updating parts of the webpage and creating new parts(elements) without completely replacing the initial page. It can also take actions based on events that happen on the browser. Events can either be system events like time, network state change(good or bad or unavailable network), etc, or user events such as mouse-clicks, hover, double-click, etc.
Javascript provides dynamics for a website by making it more “reactive”.
History of Javascript
JavaScript was invented by Brendan Eich in 1995 and became an ECMA standard in 1997.
ECMA-262 is the official name of the standard. ECMAScript is the official name of the language.
Microsoft released its own version of Javascript for Internet Explorer in 1996 and continued up until 2006 when it joined in using the standardised version.
Javascript and Java are not the same neither do they have anything in common asides from normal programming paradigms. It is highly speculative that the developers thought to ride on the wave of Java’s popularity hence the choice of name.
There are other implementation standards of Javascript such as ActionScript and Script, but that’s not necessary for you to know now.
Javascript is still under active development to date!
Features of Javascript
It runs in the browser(Nodejs is an exception as it runs on the server-side). This means you don’t need any extra dependencies to run Javascript neither do you need a virtual machine or an IDE. A javascript engine is already built-in into many browsers.
Javascript is read and compiled from top to bottom, the execution is dependent on specifications made by the developer - you.
Javascript execution only occurs on a single thread(complicated stuff you don’t need to learn, just know about it).
Javascript can create new HTML elements as well as manipulate already existing elements in a webpage.
Javascript is weakly typed, which means data types are assumed automatically and you don’t really have to define a variable type. This ensures simpler syntax and a lower learning curve.
Development Environment
You will need a suitable laptop, a browser preferably Google Chrome and Mozilla Firefox, and a text editor, preferably Visual Studio Code or Sublime Text, and you’re good to go.
Conclusion
A general misconception is that coding is hard. I wouldn't encourage such a mindset in learning this or any other thing anyway. Depending on your mindset, anything including coding is easily learnable. However, programming is a different ball game and requires innate creativity as well as problem-solving skills. This is why I would recommend trying out mentally challenging activities such as chess, the Rubik cube, etc. These have been proven to stimulate and raise one's mental capacity.
I wish you good luck and Godspeed in learning Javascript.