After this lesson you will be able to:
- Understand what are React Hooks and why are so hot 🔥
- Understand how to use
useState()
Task 1
In a new tab navigate to the Hacker News webpage, and open the Chrome Dev console (Command + Option + J).
For this exercise you may use Repl.it or the Chrome console.
function Product(name, price) { | |
this.name = name; | |
this.price = price; | |
} | |
Product.prototype.nameAndPrice = function() { | |
console.log( | |
"The product's name is: " + this.name, | |
"and the product's price is: " + this.price, | |
); |