├── README.md ├── book-list ├── app-es6-local-storage.js ├── app-es6.js ├── app.js └── index.html ├── section-10 ├── Symbols │ ├── app.js │ └── index.html ├── destruct │ ├── app.js │ └── index.html ├── iterators-generators │ ├── app.js │ └── index.html ├── maps │ ├── app.js │ └── index.html ├── profile-scroller │ ├── app.js │ └── index.html └── sets │ ├── app.js │ └── index.html ├── section-11 ├── factory │ ├── app.js │ └── index.html ├── mediator │ ├── app.js │ └── index.html ├── module-and-revealing-module │ ├── app.js │ └── index.html ├── observer │ ├── app-es6.js │ ├── app.js │ └── index.html ├── singleton │ ├── app.js │ └── index.html └── state │ ├── app.js │ └── index.html ├── section-12 └── tracalorie-project │ ├── app.js │ └── index.html ├── section-13 └── microposts │ ├── .gitignore │ ├── README.md │ ├── api │ └── db.json │ ├── assets │ └── css │ │ └── style.css │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app.js │ ├── http.js │ ├── modules-example │ │ ├── app.js │ │ ├── mymodule1.js │ │ └── mymodule2.js │ └── ui.js │ └── webpack.config.js ├── section-2 ├── arrays-methods.js ├── block-scope-with-let-and-const.js ├── calculations.js ├── console.js ├── date.js ├── functions.js ├── general-loops.js ├── if-else.js ├── index.html ├── objects.js ├── string-functions.js ├── switch.js ├── template-literals.js ├── var-let-const.js ├── variable-type-conversion.js ├── variables-types.js └── window-object.js ├── section-3 ├── creating-elements.js ├── document-object.js ├── dom-multiple-selectors.js ├── dom-single-selectors.js ├── event-bubling-and-delegation.js ├── event-listeners.js ├── index.html ├── keyboard-input-events.js ├── local-and-session-storage.js ├── mouse-events.js ├── remove-and-replace-attributes.js └── traversing-the-dom.js ├── section-4 ├── loan-calculator │ ├── app.js │ ├── img │ │ └── loading.gif │ └── index.html ├── number-guesser │ ├── app.js │ └── index.html └── task-list │ ├── app.js │ └── index.html ├── section-5 ├── built-in-constructors.js ├── constructor-and-this-keyword.js ├── es6-class-inheritance.js ├── es6-class.js ├── index.html ├── object-create.js ├── prototype-inheritance.js └── prototype.js ├── section-7 ├── exercise-1 │ ├── app.js │ ├── data.txt │ └── index.html ├── exercise-10 │ ├── app.js │ ├── easyhttp2.js │ └── index.html ├── exercise-11 │ ├── app.js │ └── index.html ├── exercise-12 │ ├── app.js │ ├── easyhttp3.js │ └── index.html ├── exercise-2 │ ├── app.js │ ├── customer.json │ ├── customers.json │ └── index.html ├── exercise-3 │ ├── app.js │ └── index.html ├── exercise-4 │ ├── app.js │ └── index.html ├── exercise-5 │ ├── app.js │ ├── easyhttp.js │ └── index.html ├── exercise-6 │ ├── es6-promise.js │ └── index.html ├── exercise-7 │ ├── app.js │ ├── index.html │ ├── posts.json │ └── test.txt ├── exercise-8 │ ├── app.js │ └── index.html └── exercise-9 │ ├── app.js │ ├── index.html │ ├── posts.json │ └── test.txt ├── section-8 ├── githubfinder │ ├── app.js │ ├── github.js │ ├── index.html │ └── ui.js └── weatherjs │ ├── app.js │ ├── index.html │ ├── storage.js │ ├── ui.js │ └── weather.js └── section-9 ├── error-handling ├── app.js └── index.html ├── regular-expression ├── exercise-1 │ ├── app.js │ └── index.html └── exercise-2 │ ├── app.js │ └── index.html └── user-form ├── app.js └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # [Course - Modern Javascript from Beginning](https://www.udemy.com/modern-javascript-from-the-beginning) 2 | 3 | This repository is a place where i store all the files used in this course and can assist as consultation for commands and patterns. 4 | 5 | The course explains how to code in javascript from with new concepts from ES6+, where all the examples are great and explain straight to the point, i really recomend this course for people that have a minimal knowledge in javascript and want to understand old and new javascript code and patterns. 6 | 7 | [Youtube from teacher](https://www.youtube.com/traversymedia) 8 | -------------------------------------------------------------------------------- /book-list/app-es6-local-storage.js: -------------------------------------------------------------------------------- 1 | class Book { 2 | constructor(title, author, isbn) { 3 | this.title = title; 4 | this.author = author; 5 | this.isbn = isbn; 6 | } 7 | } 8 | 9 | class UI { 10 | addBookToList(book) { 11 | const list = document.getElementById('book-list'); 12 | // Create tr element 13 | const row = document.createElement('tr'); 14 | // Insert cols 15 | row.innerHTML = ` 16 |
Title | 48 |Author | 49 |ISBN# | 50 |51 | |
---|
This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
20 |It uses utility classes for typography and spacing to space content out within the larger container.
22 | Learn more 23 |This is the about page
32 | `; 33 | } 34 | 35 | // Contact State 36 | const contactState = function(page) { 37 | document.getElementById('heading').textContent = 'Contact Us'; 38 | document.getElementById('content').innerHTML = ` 39 | 50 | `; 51 | }; 52 | 53 | // Instantiate pageState 54 | const page = new PageState(); 55 | 56 | // Init the first state 57 | page.init(); 58 | 59 | // UI Vars 60 | const home = document.getElementById('home'), 61 | about = document.getElementById('about'), 62 | contact = document.getElementById('contact'); 63 | 64 | // Home 65 | home.addEventListener('click', (e) => { 66 | page.change(new homeState); 67 | 68 | e.preventDefault(); 69 | }); 70 | 71 | // About 72 | about.addEventListener('click', (e) => { 73 | page.change(new aboutState); 74 | 75 | e.preventDefault(); 76 | }); 77 | 78 | // Contact 79 | contact.addEventListener('click', (e) => { 80 | page.change(new contactState); 81 | 82 | e.preventDefault(); 83 | }); -------------------------------------------------------------------------------- /section-11/state/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |What's on your mind
23 |Guess a number between and
15 | 16 | 17 | 18 |Enter a username to fetch a user profile and repos
20 | 21 |