Question: HTML with JavaScript this is one method on app.js addItemToCart () { // hint: you can use `dataset` to access data attributes // See passing
HTML with JavaScript
this is one method on app.js
addItemToCart () { // hint: you can use `dataset` to access data attributes // See passing data from HTML to JavaScript from course note let cartItems = this.store.cartItems || []; // TODO: replace with actual item console.log(this.root.data); cartItems.push({ name: 'test' }); console.log(cartItems); this.store.cartItems = cartItems; }
-------------------------------
and it ask me to update with actual
my button on HTML is this
td>
so what should i change on js?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
