BLOG
23 August 2023

Javascript notes

TTTThis

https://www.youtube.com/watch?v=hdI2bqOjy3c

2 ways to put javascript on a page

<scripttttttt>alert('Hello world');</scriptttttttt>
a second file, called main.js
No need for <scripttttttt> tags because it's in the js file, so just put
alert('Hellow world');
Done

To view this in the browser, you want Console (tab) in Developer Tools for whatever browser

You can type javascript in it, like


alert(1)

and it works

VOCABULARY
The DOM is the user interface (selecting elements), as separate from the Console where actions are performed.

const = can't be changed (you can change the values of arrays variables etc though), and you have to put a value.

let = like an initial position

NewerManjaro OlderLatam travel notes