What is JavaScript?

JavaScript (often abbreviated as JS) is a very powerful programming language that is primarily used to execute client-side scripts.


In essence, this means that the scripts are being executed by the user’s computer rather than website’s server computer, speeding up the time it takes to display the website. Most of the time, JavaScript is used for dynamic or moving elements of a WordPress site such as sliders, rotating testimonials, buttons, and popups.


WordPress relies heavily on JavaScript to perform a number of functions, although you won’t need to understand how to code in JavaScript in order to operate a WordPress site. JavaScript is primarily used with plugins, but it can also be used inside of themes.


JavaScript files are usually stored inside a directory named “js” that is part of your theme or plugin. That way, all of the JavaScript files are kept separately and can be replaced/updated when needed. JavaScript files are first placed in a queue to be loaded by the user’s computer and then executed when they are needed as a way to allow the website to load much more quickly.


WordPress comes built-in with several JavaScript libraries or collections of files, including jQuery, Underscores, Backbone Javascript, and JSON for JS.


All major web browsers have a special JavaScript engine built-in that is solely dedicated to executing JavaScript code. Keep in mind, however, that some older browsers may not be able to execute JavaScript code, and some visitors will have turned off the JavaScript functionality in their browsers for security purposes. Therefore, it is always important to test how your website operates when JavaScript is not enabled or available.


Useful resources about JavaScript

The following two tabs change content below.

Jamie Spencer

My name is Jamie Spencer and I have spent the past 10 years building money making blogs. After growing tired of the 9-5, commuting and never seeing my family I decided that I wanted to make some changes and launched my first blog. Since then I have launched lots of successful niche blogs and after selling my survivalist blog I decided to teach other people how to do the same.