Skip to content

Instantly share code, notes, and snippets.

View Octagon-simon's full-sized avatar
Turning red flags into red tests that pass.

Simon Ugorji (Octagon) Octagon-simon

Turning red flags into red tests that pass.
View GitHub Profile
<button onclick="delRecords()"> Delete All </button>
function delRecords() {
if( confirm ("Are you sure you wish to delete all? ") === true ) {
//something magical happens here
}
}
if( confirm("I am above 18 years") === true ){
//proceed
}else{
window.location.assign("./");
}
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
}
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);
const dt_date2 = new Date(date2);
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);
const dt_date2 = new Date(date2);
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);
function calcDate(date1, date2){
/*
* calcDate() : Calculates the difference between two dates
* @date1 : "First Date in the format MM-DD-YYYY"
* @date2 : "Second Date in the format MM-DD-YYYY"
* return : Array
*/
//new date instance
const dt_date1 = new Date(date1);