3.3 JavaScript

When used for web development JavaScript is used with two other coding languages, HTML and CSS. These three are the backbone of the websites you visit. JavaScript is used primarily in making websites interactive but can also be used in other ways for instance making games. 

JavaScript on its own is still not a great place to start unless all you want to do is design websites, which is a good enough reason to start to learn to code. you can start earning money quite quickly once you get a little bit proficient. 

There is a library linked to JavaScript (call it a subset) that was created for artists by artists who wanted a language they could use for digital art. It is open source and called p5.js, but more on that later. Just so you don’t think I have written off JavaScript just yet. 

If you want to create websites then I would recommend learning JavaScript and even if you don’t it is one to have under your belt as there are many applications that use this very popular language. I have included it here as a language to learn both for now and the future. 

It does no harm at all to have an understanding how a website is created using HTML, CSS and JavaScript and you will realise how much you use it in every day life. It is not an easy one to start with though so that is why I recommend p5.js. Below is a relatively simple example where you change the text with the click of a button. 

<!doctype html>

<html>

<head>

<title>Js change text</title>

</head>

<body>

<h1>Js change text</h1>

<p id=”text”>You can change the text</p>

<button type=”button” onclick = “document.getElementById(‘text’).innerHTML = ‘…to this using a click of a button'”>Click here</button>

</body>

</html>