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 (let i = 0; i < 3; i++) { | |
console.log(i); | |
for (let i = 10; i < 13 i++) { | |
console.log(i); | |
for (let i = 100; i < 103; i++) { | |
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
const myName = "Zack"; | |
myName += " Biernat"; //Throws an error | |
myName = "Jan Jansen, I come from Wisconsin"; //Throws an error |
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
import ReactDOM from 'react-dom'; | |
import { makeMainRoutes } from './Routing/routes'; | |
const routes = makeMainRoutes(); | |
ReactDOM.render( | |
routes, document.getElementById('root') | |
); |
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
import React from 'react'; | |
import { Route, Router } from 'react-router-dom'; | |
import App from 'App.js'; | |
import Dashboard from 'Dashboard.js'; | |
export const makeMainRoutes = () => { | |
return ( | |
<Router component={App}> | |
<div> | |
<Route exact path="/" render={(props) => <App {...props} />} /> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>My quick server</title> | |
</head> | |
<body> | |
This is my basic index.html file | |
</body> | |
</html> |
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
var http = require('http'); | |
var fs = require('fs'); | |
var server = http.createServer((request, response) => { | |
response.writeHead(200, { | |
'Content-Type': 'text/html' | |
}); | |
fs.readFile(__dirname + '/index.html', (err, contents) => { | |
response.end(contents); | |
}) | |
}).listen(3000, '127.0.0.1'); |
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
var http = require('http'); |
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
const Tower = function(n) { | |
this.top = -1; // push will add one to top | |
this.stack = []; | |
for (let i = n; i > 0; i--) { | |
this.stack.push(i); | |
} | |
} | |
// push |