Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| function updateScore(name, score) { | |
| // GET PREVIOUS SCORE | |
| let previousScore = JSON.parse(localStorage.getItem("score")); | |
| if (!previousScore) { | |
| previousScore = []; | |
| } | |
| // UPDATE THE SCORE | |
| const newScore = { name, score }; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Semantic HTML</title> | |
| <meta charset="UTF-8" /> | |
| </head> | |
| <body> | |
| <nav> | |
| <a href="">Home</a> |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| class Player extends React.Component { | |
| constructor() { | |
| super() | |
| this.state = { score: 0 } | |
| } | |
| increaseScore() { | |
| // 1. Get previous state from this.state | |
| this.setState({ score: this.state.score + 1 }) |