Skip to content

Instantly share code, notes, and snippets.

View djasuncion's full-sized avatar
🎯
Focusing

DJ Asuncion djasuncion

🎯
Focusing
View GitHub Profile
@djasuncion
djasuncion / closure.js
Created March 8, 2020 13:23
YDKJSY > Get Started > ApB > Practicing Closure
function range(start, end) {
// ..TODO..
let startNum = Number(start);
console.log(startNum);
let array = [];
if (end == 0) {
return (array = []);
} else if (start === end) {
@djasuncion
djasuncion / comparison.js
Last active March 7, 2020 10:39
YDKJSY > Get Started > ApB > Practicing Comparisons
const dayStart = "07:30";
const dayEnd = "17:45";
function scheduleMeeting(startTime, durationMinutes) {
function toMinutesNum(string) {
const regex = /^\d{1,2}:\d{2}$/;
if (regex.test(string)) {
const array = string.split(":");
const HOUR = Number(array[0]);
const MINUTE = Number(array[1]);