After learning the basics of HTML and CSS, JavaScript was the first programming language I learned. Between HTML, CSS, and JavaScript, I learned the three core technologies behind the World Wide Web.
While HTML is the markup language that gives a website its structure, and CSS applies the style to the HTML content, JavaScript is a scripting language used to make web pages interactive and provide online programs. The majority of websites employ it, and all modern web browsers support it.
In most basic terms, every time a web page has movement or something interactive on it, it is utilizing JavaScript. This includes content updates, interactive maps, 2D/3D graphics and scrolling video jukeboxes.
JavaScript is implemented in many types of host software, including both client-side and server-side web servers and databases, and in non-web programs such as word processors and PDF software and in runtime environments for writing mobile and desktop applications.
As of May 2017, 94.5% of 10 million most popular web pages used JavaScript.
Because JavaScript code can run locally in a user’s browser (rather than on a remote server), the browser can respond to user actions quickly, making an application more responsive. JavaScript can also detect user actions that HTML alone cannot.
What are some basic characteristics of JavaScript?
JavaScript supports event-driven, functional and imperative programming styles. It has an API for working with text, arrays, dates, and imperative expressions, and basic knowledge of the Document Object Model (DOM). The DOM allows JavaScript to dynamically modify HTML and CSS to update a user interface.
JavaScript is an object-based, case-sensitive scripting language.
When the browser encounters a block of JavaScript, it generally runs in order, from top to bottom, so the order in which you enter things matters.
A JavaScript engine is an interpreter that interprets JavaScript source code and executes the script accordingly. Since the code is run from top to bottom, the result of running the code is immediately returned. This means that JavaScript is not a compiled language, which is when the code needs to be transformed before they are run by the computer.
JavaScript is considered dynamic code—it has the ability to update the display of a web page or app to show different things in different circumstances. This is as opposed to static code – where the same content shows all the time.
How are API’s related to JavaScript?
Application Programming Interfaces (APIs) are ready-made sets of code building blocks that allow a developer to implement programs in a much easier fashion.
Browser APIs are built into your web browser and are able to expose data from the surrounding computer environment. A good example of this is a geolocation API, which retrieves geographical information. Google Maps is able to find your location and put it on a map. Another example is the DOM API—every time you see a popup window on your page, or some new content displayed, that’s the DOM in action. The Canvas and WebGL APIs allow you to create animated 2D and 3D graphics. Audio and Video APIs enable you to play audio and video on a web page, or grab video from a web camera and play it on someone else’s computer.
Third-party APIs are not built into the browser by default, so you need to grab their code and information from somewhere on the Web. An example of this would be if Twitter allows you to embed your latest tweet on your website, or Google Maps allows you to embed custom maps into your website.
What are the benefits of JavaScript?
JavaScript allows for each individual browser tab to run its own separate code—so the code in one tab cannot affect another tab or another website. This browser security keeps pirates from writing code to steal information from other websites.
JavaScript is considered a fast language because it can be run immediately within the client-side browser. This is the advantage it has over being compiled, as mentioned above.
JavaScript is a relatively easy language to learn because its syntax is close to the English language. The DOM model offers plenty of pre-written functionality, making it simple to develop a script for a specific purpose.
JavaScript is very popular, which means—my favorite things: large libraries, huge communities, lots of pre-written code, plenty of places to reference and lots of support.
JavaScript works very well with other languages and can be used with a variety of languages. This means it can be inserted into any web page regardless of file extension. Since JavaScript is client-side, it reduces the demand on the website server.
JavaScript has functionality extension, which means third-party add-ons that enable developers to write snippets of JavaScript which can execute on desired web pages to extend its functionality.
What are some disadvantages of JavaScript?
While the client-side aspect has its advantages, it can cause its lapses in security. Since the code executes on the person’s computer, it can be exploited. A certain restriction is set by modern web standards on browsers, but malicious code can still make its way past those restrictions.
Sometimes JavaScript is interpreted differently by various browsers, giving it an inconsistent functionality and interface. This is why it’s very important to test your code in all of the major browsers before considering it a finished product.
What does a JavaScript developer do?
A JavaScript developer must implement the front-end logic that defines the behavior of the visual elements of a web application. They must connect this with the services that exist on the back-end. Often, they are supported by back-end web developers and are responsible for server-side application logic. They work alongside front-end developers who specialize in markup and styling. They define how the application looks and functions.
RELATED STORY: Getting to know the R programming language
JavaScript developers have the ability to identify and work with more platforms than any other high-level programming language, as JavaScript has the strongest Open Source Software (OSS) module ecosystem available.
They develop new user-facing features, build reusable code and libraries, optimize applications for maximum speed and scalability and ensure that user input is validated before submitting to back-end services.
What do employers look for in a good JavaScript developer?
There are a number of things that a JavaScript developer can require, and it can fluctuate with each person you talk to and each job you apply to, but here is a great list to start with. The most important thing to be, as a JavaScript developer, is a strong learner with the willingness to always improve upon your own knowledge.
A good JavaScript developer should have a good understanding of JavaScript libraries and frameworks, AJAX, partial page updates, cross-browser compatibility issues, JavaScript module loaders and front-end build tools, and code versioning tools. They should also have an understanding of browser rendering behavior and performance.
A JavaScript developer should have a strong understanding of developer tools for things like debugging and examining application code. They need to know how to use JavaScript functions and Node.js.
They must also have the traits that all employers look for in a good developer. They must be driven, self-motivated, good at communicating, detail oriented as well as big-picture oriented. They should have a knowledge of math, logic, and abstraction. Above all, they must be willing to put in some time outside of work hours to sharpen their skills.
What kind of jobs can you get with JavaScript?
About one-third of all programming-related jobs listed on sites like Indeed require JavaScript proficiency.
The most common JavaScript jobs include front-end web development. This entails building the user-facing, visual parts of a website.
JavaScript also covers web application development, which means creating web-based software applications, including interactive online forms and shopping carts, word processing and spreadsheet programs, photo and video editors, scanning programs and file conversion, and email software.
JavaScript can also lead to positions in website administration, involving the maintenance and updating of existing websites for an organization. It is also a great language to know when you just need general coding skills to qualify you for a job, like that of a Product Manager.
Where can I learn JavaScript?
Check out my suggestions for finding the right bootcamp for yourself here. You can also click here for best places to practice, here for ways to pursue learning on your own, and here for some sites to help you get started. Also, these two lists of top blogs pertaining specifically to JavaScript will help too: 10 Top JavaScript Blogs To Improve Coding Skills and Top 30 JavaScript Blogs & Websites for JavaScript Developers in 2018.
Overall, JavaScript is a great first language to learn based on its simple syntax and strong community and will give you a highly marketable skill for your resume, which could ultimately lead you to creatively fulfilling and professionally rewarding work.
This article is part of WorkingNation Associate Producer Jaimie Stevens’ “Starting Out in Tech” series where she shares her insight into becoming a computer programmer. Catch up on her previous articles here.
Join the Conversation: Share your thoughts on the latest Starting Out in Tech column on our Facebook page.