Skip to content

Instantly share code, notes, and snippets.

@MartaJank
MartaJank / README.md
Created November 17, 2020 15:22 — forked from ross-u/README.md
JS | Asynchronous JS and callbacks

JS | Asynchronous JS and callbacks


Console Clock - example

@MartaJank
MartaJank / clock.js
Created November 17, 2020 15:22 — forked from ross-u/clock.js
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"
}
@MartaJank
MartaJank / README.md
Created November 17, 2020 15:21 — forked from ross-u/README.md
Function for deep copying objects and arrays - cloneObject()

Function for deep copying objects and arrays - cloneObject()


@MartaJank
MartaJank / ES5.js
Created November 17, 2020 15:21 — forked from ross-u/ES5.js
JS | Prototypes - ES5 vs ES6 syntax
function Product(name, price) {
this.name = name;
this.price = price;
}
Product.prototype.nameAndPrice = function() {
console.log(
"The product's name is: " + this.name,
"and the product's price is: " + this.price,
);
@MartaJank
MartaJank / README.md
Created October 23, 2020 14:43 — forked from ross-u/README.md

JS | Hero Factory - OOP Exercise (ES6)



For this exercise you can use Repl.it or your code editor.

@MartaJank
MartaJank / README.md
Created August 13, 2020 11:10 — forked from ross-u/README.md
Ironhack - WDFT 06/2020 - Videos