JavaScript is a programming language that web developers use when building websites. Probably every single website in existence has some JavaScript in it. When I first started learning to code, JavaScript was my first language, for better or worse.
Do you really need to learn JavaScript as a web developer?
If you are going into web development, learning JavaScript is practically a necessity. It’s is a pretty easy language to start using immediately without any configuration or complicated local development setup.
As long as you have any modern web browse, you’re good to go. That’s because JavaScript completely runs in the browser. You could create a simple HTML file with a little inline script element to get started. The barrier to entry is extremely low. Getting a local development environment setup to develop an iPhone or Android app is a whole different story. It could take days to set up. With JavaScript, it only takes minutes.
What can JavaScript do?
Client-side JavaScript can do a lot in the browser, but it’s completely constrained to the browser. It can’t touch files on someone’s computer, like a server-side language could touch files on a server. It would be disastrous if it could.
Server Communication
Probably its most important use is communicating with servers without requiring a refresh of the page. Most of the time, you are communicating with your own server, and you can send any type of request to the server with any kind of payload (text, images, files, videos).
State and Data Management
Another important function is data management. When you interact with a web applications, tons of data is being managed in JavaScript, in-memory.
In email web applications, it keeps track of what email you just opened or which one you opened previously. It keeps track of the application’s state.
DOM Manipulation
Javascript can access the elements on a web page and make changes to them. It can also create and delete elements on a web page. It’s this ability that makes many web applications feel like native applications (iPhone app, desktop app).
What features does the language have?
The JavaScript language has many features that a lot of other languages have, like functions, arrays, and loops.
The execution of these features is a lot different from other languages, but some framework, in other programming languages (like Laravel) create a syntax that is similar to JavaScript.