Presenter: Diana Ignat
JavaScript
- JavaScript is a programming language made for the web
- It can update and change both HTML and CSS
- Think about a website, it shows words, pictures, maybe videos. But what makes it do stuff when you click, tap or type?
What is JavaScript?
- show messages when you click a button
- check if you typed your password correctly
- create games and quizzes
- make fun animations and effects
What can JavaScript make websites do?
Real life examples
- when you click like on instagram -> the heart fills in right away
- comments appear instantly after you hit "post"
Social media
- when you add something to your cart
- when you choose size or color of a product
- when you upload homework -> status shows 'submitted'
- notifications appear when grades are posted
Online shopping
School portals
- Open your browser
- Right-click -> Inspect -> Go to Console tab
- Type:
alert("Hello! This is my first JavaScript command.");
- Press Enter
See JavaScript in action
- JavaScript is a list of instructions for the computer
- The browser reads them top to bottom
- Each instruction tells it to do something: show a pop-up, do math, remember a value
- It's like writing steps in a recipe
What does JS code look like?
- A variable is like a box with a name
- It stores information for later
- You can put things in, take them out, or change them
Variables: how JS remembers stuff
let score = 0;
score = score + 10;
alert(score);
-> created the box
-> changed what's inside
-> displayed it
Ellipse
By diaignat
Ellipse
- 0