Skip to content

Instantly share code, notes, and snippets.

@ross-u
ross-u / README.md
Created June 2, 2020 12:42
JS | Closure - ES6 examples with class

JS | Closure, IIFE and Module Pattern


Terminology :

Global scope — The default environment where your code is executed for the first time.

Function scope — Whenever the flow of execution enters a function body. >

REST API

Representational State Transfer


REST is a design pattern (for APIs) and describes how network resources are accessed.

React | state ( exercise solution )


Answers:


1. What is the difference between the React's function components and class components ?

@ross-u
ross-u / README.md
Last active February 17, 2022 03:36
React | class vs function components & state

React | state


@ross-u
ross-u / gist:75b2acf0ca2e497b3d717619a932dceb
Created April 30, 2020 14:18 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
/*
FOR TEST EXAMPLES AND DIFFERENT MATCHERS (`toEqual`, `toBe`, `not.toBe`, etc):
https://jasmine.github.io/api/3.4/global
*/
describe('centsToDecimals function', () => {
// Describes the suite / group of tests
// Use this test suite as a starting point/reference.
@ross-u
ross-u / README.md
Last active April 22, 2020 15:11
REST Principles

NodeJS


CLI

Command Line interface - Program where you type things in your computer rather than clicking - example Bash on Linux, Terminal on Mac, Command Prompt on Windows.

@ross-u
ross-u / README.md
Last active January 22, 2021 10:20
M1 project setup & ESlint

M1 project setup

Create file structure

mkdir m1-project 
@ross-u
ross-u / clock.js
Last active November 17, 2020 15:22
Clock & setInterval example - 2020 mar
// Get the DOM elements
const stopButton = document.querySelector("#stop-btn");
const h1Tag = document.querySelector("h1");
const second = 1000;
// Formats one digit number to a string with "0"
function concatZero (num){ // 1 22
return ('0' + num ).slice(-2); // "01" "22"
}