Quick Recap презентация

Содержание

Слайд 2

web page

index.html




<br> Домашняя страница Васи Пупкина<br>


...


Слайд 3

теги


Слайд 4

вложенные теги

nested.html


Какой-то блок


Нырнём поглубже
Достаточно.







DOM Tree

Слайд 5

атрибуты


Слайд 6

glance at your creation

Слайд 8

basic syntax

selector {
property: value;
}

Слайд 9

селекторы

.className
#idValue
div

Слайд 10

file tree

Слайд 11

тег link

href='main.css' />

Слайд 12

Практика

Слайд 15

devtools encounter

Слайд 17

variables

let variable = value

Слайд 18

To ; or not to ;

Слайд 19

bad

var variable = value

Слайд 20

pro

const some = constVal

Слайд 21

examples

variables.js

const number = 0.5
const string = ‘Hey guys, massive legend here!’
const array =

[‘some’, 42, number]
// yikes
const greeter = name => `Hello, ${name}`
console.log(greeter(‘world’))

Слайд 22

Типы данных

Слайд 24

Number

42.0

Слайд 25

Number

> 42 / 0
Infinity

Слайд 27

String

‘Продам гараж’

Слайд 28

String

> ‘THANOS’ + ‘CAR’
THANOS CAR

Слайд 30

immutable

const str = ‘Hello’
str[0] = ‘B’
// no effect

Слайд 32

Boolean

> true !== false
true

Слайд 34

Undefined

Слайд 37

Object

const object = {
someKey: ‘value’,
another: 7
}

Слайд 38

Object

> object.someKey
value
> object[‘another’]
7

Слайд 39

always by reference

const a = {k: 1}
const b = a
a.k = 2
b.k
// 2

Слайд 40

Синтаксические конструкции

Слайд 41

If clause

Слайд 42

if

if (condition) {
statements
}

Слайд 43

if-else

if (condition) {
statements
} else {
more statements
}

Слайд 44

if-elseif

if (condition) {
statements
} else if (cond) {
more statements
}

Слайд 45

falsy

0, null, undefined, ‘’,
false, NaN

Слайд 46

truthy

if (‘0’)
console.log(‘yikes’)

Слайд 47

many pitfalls of js comparisons

> 5 == ‘5’
true
> 5 === ‘5’
false

Слайд 49

while

while (condition) {
statements
}

Слайд 50

for

for (i; cond; i++) {
statements
}

Слайд 51

for-of

for (el of iterable) {
statements
}

Слайд 52

for-of

for-of.js

const numbers = [1, 2, 3, 7]
for (let number of numbers)
console.log(number)
/*
1
2
3
7
*/

Слайд 53

for-in

for (key in iterable) {
statements
}

Слайд 54

for-in

for-of.js

const numbers = [1, 2, 3, 7]
for (let index in numbers)
console.log(index)
/*
0
1
2
3
*/

Слайд 55

Functions

Слайд 56

functions

function name (args) {
statements
}

Слайд 57

anonymous functions

function (args) {
statements
}

Слайд 58

anonymous.js

const greeter = function (name) {
console.log(‘Hello, ‘ + name.toString())
}
greeter(‘Billy’)

Слайд 59

Практика

Слайд 61

file tree

Слайд 62

include


Слайд 63

or


Слайд 64

button tag

button.html


Слайд 65

query selector

queryselector.js

const button = document.querySelector(‘#button’)
button.textContent = 'Please, press me'

Слайд 66

event listeners

addEventListener.js

const button = document.querySelector(‘#button’)
button.addEventListener(‘click’, function () {
alert(‘Thank you kindly!’)
})

Слайд 67

Практика

Имя файла: Quick-Recap.pptx
Количество просмотров: 48
Количество скачиваний: 0