$ docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i=1; i <= 20; i++) | |
{ | |
if (i % 15 == 0) | |
console.log("FizzBuzz"); | |
else if (i % 3 == 0) | |
console.log("Fizz"); | |
else if (i % 5 == 0) | |
console.log("Buzz"); | |
else | |
console.log(i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getPosts().then(posts => { | |
console.log(posts.length); | |
}); | |
async function getPosts() { | |
try { | |
const response = await fetch("https://jsonplaceholder.typicode.com/posts"); | |
return response.json(); | |
} catch(error) { | |
console.log(error); |
This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.
Mongo Manual can help you with getting started using the Shell.
FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Human { | |
constructor() { | |
this.gender = 'female' | |
} | |
printGender() { | |
console.log(this.gender) | |
} | |
} |
The state of a React class is a special property that controls the rendering of a page. When you change the state, React knows that the component is out-of-date and will automatically re-render.
that it is accessible in other methods, not just the render method.
Another important change you made was to create the getTotal() method
Some links 🔗: https://fettblog.eu/typescript-react/