Contenido del Curso
Advanced JavaScript Mastery
Advanced JavaScript Mastery
1. Classes
Welcome to the CourseClass DeclarationChallenge: Building a Class Class MethodsChallenge: Adding Methods to a ClassParameter ObjectPrivate PropertiesChallenge: Implementing Private Properties in a ClassGetters and SettersChallenge: Managing Properties with Getters and SettersStatic PropertiesStatic MethodsChallenge: Using Static Properties and Methods in a ClassInheritance with extends and Using super()Challenge: Class Inheritance with Extends and Using Super
2. DOM Manipulation
What is the DOM?Querying the DOMChallenge: Querying the DOMUnderstanding the DOM HierarchyChallenge: DOM HierarchyDOM PropertiesWorking with Element AttributesChallenge: Working with Element Properties and AttributesAdding ElementsRemoving ElementsChallenge: Adding and Removing ElementsModifying Element StylesChallenge: Modifying Element Styles
Challenge: Adding and Removing Elements
Task
You're building a shopping cart where users can add and remove items.
- Add an Item to the Cart:
- Create a new
<li>
element; - Create a new
<button>
element; - Add new
<button>
element to the new<li>
element; - Add a new
<li>
element to the<ul>
with thecart-list
ID.
- Create a new
- Remove an Item from the Cart: Delete the specific
<li>
element from the<ul>
.
index.html
index.css
index.js
- Use
createElement
to create a new<li>
element; - Use
createElement
to create a new<button>
element; - Use
appendChild
to add new<button>
element to the<li>
element; - Use
appendChild
to add a new<li>
element to the<ul>
with the IDcart-list
; - Use
removeChild
to delete the specific<li>
element from the<ul>
.
index.html
index.css
index.js
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 11