Содержание
- 2. web page index.html Домашняя страница Васи Пупкина ...
- 3. теги
- 4. вложенные теги nested.html Какой-то блок Нырнём поглубже Достаточно. DOM Tree
- 5. атрибуты
- 6. glance at your creation
- 7. why
- 8. basic syntax selector { property: value; }
- 9. селекторы .className #idValue div
- 10. file tree
- 11. тег link href='main.css' />
- 12. Практика
- 13. practice
- 14. JS
- 15. devtools encounter
- 16. Basics
- 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
- 22. Типы данных
- 23. Number
- 24. Number 42.0
- 25. Number > 42 / 0 Infinity
- 26. String
- 27. String ‘Продам гараж’
- 28. String > ‘THANOS’ + ‘CAR’ THANOS CAR
- 30. immutable const str = ‘Hello’ str[0] = ‘B’ // no effect
- 31. Boolean
- 32. Boolean > true !== false true
- 33. Null
- 34. Undefined
- 35. Symbol
- 36. Object
- 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
- 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
- 48. Lööps
- 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) /*
- 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) /*
- 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. Практика
- 60. DOM API
- 61. file tree
- 62. include
- 63. or your awesome code
- 64. button tag button.html Press me, ye mongrel
- 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. Практика
- 69. Скачать презентацию