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. >
/* | |
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. |
Representational state transfer (REST) is a software architectural style that defines a set of guidelines to be used when creating Web services.
// 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" | |
} |