Session 0
This is console.log(), a function that comes
built-in to javascript, meaning we don’t have
to create it ourselves. You can recognise that
it’s a function because of the brackets at the
end.
Console.log is essentially a print statement.
Whatever is inside those brackets, whether a
variable or a string, i.e “Hello World” will be
printed in the console.
A variable in Javascript is essentially a container that holds reusable data. The
most popular way to think of them is like boxes. We store different data types
within these boxes, and then label them so that we can use them again and again.
For example, think of a cardboard box. We can store whatever we want inside it,
like the solution to a problem, a number or anything else we can think of. If we
intend to store apples, pears and bananas in the box, we might want to write ‘fruit’
as the label, or variable name.
Variables created with Var key word but in some java scripts it can be let or const
var fruit = “apple”;
- Let is the closest to var - it has a scope that
can be restricted to within its own block of
code. Lets are also mutable, meaning the
value can be reassigned.
- Const is a constant value - it cannot be
redefined or reassigned. It also has a local
scope, meaning it is restricted to a block of
code.
. Some of the most common data types we will be using are
numbers (1,2,3), booleans (true or false) and strings (“isn’t this fun?). We can then assign these
values to
variables…
Final task unexpected error – need to fix
Skipped due to lack of time.
Project
To open in chrome- save file.html. Select language/!
Get template of html ten in the body do
H1 for heading
<h1>hello</h1>
And then save the file
Then go to file explorer find html file and drag it into chrome
Simple as!
https://www.youtube.com/watch?v=nqN_VPvMpW4
Right click and press inspect to open up console on the web page
Random
Later place in screenshots and annotate remember slack has codes correspondog to sessions if
possible plan for tonights meeting
Session 2 skipped
Session 3:
The HTML DOM is the Document Object Model, the interface created
when a webpage first loads that contains all of the information relevant to the
construction of that page.
. The DOM is a standard format for how we can get, change,
add or delete elements.
Reflection: nect time: in lesson be present, ask questions, ask for help. After lesson do h/w watch
tutorials ask for help from instructors try something with the element of what I have just learnt. Each
week combine together skills. Set pout a 3 hour window within the week to practice what I have e
learnt. Bwfore going into new stuff I wnt to make promises and honour them.