Skip to content

Instantly share code, notes, and snippets.

@ross-u
ross-u / README.md
Last active February 8, 2021 07:39
Lecture - JS | Special value this (Teacher Notes)

Teacher Notes:

JS | Special keyword this


@ross-u
ross-u / README.md
Last active February 8, 2021 04:10
Lecture - JS | Special value this (student material)

JS | special value this

Learning goals:

After this lesson, you will be able to:

  • understand the purpose of special value this
  • list the rules of special value this
@ross-u
ross-u / README.md
Created February 3, 2021 07:43
Start MongoDB shell and commands

MongoDB shell and commands

Mongo shell is a CLI that we use to work with the Mongo database directly from the terminal.

Mongo shell uses JavaScript, therefore the syntax is the same as working with JS and calling methods.

@ross-u
ross-u / index.js
Created January 27, 2021 12:33
M1 Project localStorage - game score example
function saveScore(name, score) {
// Get the string data from localStorage
// Convert it to an array
const scoreStr = localStorage.getItem('score');
let scoreArr;
const newScore = { name: name, score: score };
// Add new score to the array
if (!scoreStr) {
@ross-u
ross-u / README.md
Created January 14, 2021 15:31
M1 - VSCode extensions & Prettier Setup

M1 - VSCode Extensions


VSCode Extensions:

@ross-u
ross-u / infinity-example.js
Created January 10, 2021 22:43
JS Infinity use case example
function findSmallest(array) {
var min = Infinity; // <== control variable used to check agains and store the value
for (var i = 0; i < array.length; i++) {
var currentNum = array[i];
if (currentNum < min) {
min = currentNum;
}
}
@ross-u
ross-u / README.md
Last active January 31, 2021 18:42
M2 - project structure (ExpressJS + Mongoose + JSX)

M2 - project setup (Node + ExpressJS + Mongoose + JSX)


Getting Started

@ross-u
ross-u / README.md
Last active January 31, 2021 18:41
ExpressJS (JSX) | GET & POST - Sending form data - Exercise

ExpressJS (JSX) | GET & POST


@ross-u
ross-u / README.md
Last active January 31, 2021 18:40
M2 - Lecture Notes - Express Server Side Rendering Basics (JSX)

Express | Server Side Rendering Basics

Learning Goals

After this lesson you will be able to:

  • Server side render HTML pages with Express.
  • Understand what a templating engine , templates and server side rendering are and why we use them.
  • Understand and use express-react-views for creating dynamic templates.
  • Understand and use JSX syntax in express-react-views.
@ross-u
ross-u / README.md
Created November 10, 2020 15:35
File structure example
📦02-express-server
 ┣ 📂node_modules
 ┣ 📂public
 ┃ ┃
 ┃ ┣ 📂css
 ┃ ┃ ┣ 📜about.css
 ┃ ┃ ┗ 📜main.css
 ┃ ┃  
 ┃ ┣ 📂views