This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const MONTHS = { | |
| jan: 'January', | |
| feb: 'February', | |
| mar: 'March', | |
| apr: 'April', | |
| may: 'May', | |
| jun: 'June', | |
| jul: 'July', | |
| aug: 'August', | |
| sep: 'September', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="custom-file"> | |
| <input type="file" class="custom-file-input" id="file" name="file"> | |
| <label for="file" class="custom-file-label">File</label> | |
| </div> | |
| <script> | |
| // Helper function | |
| const addFileNameToLabel = file => { | |
| const fileName = file.target.files[0].name | |
| const customLabel = file.target.nextElementSibling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const MILLISECONDS_IN_DAY = 864e+5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isPrime(num) { | |
| if (num > 1) { | |
| for (let i = 2; i < num; i++) { | |
| if (num % i === 0) { | |
| console.log(`${num} is not a prime number`) | |
| console.log(`${i} * ${num / i} is ${num}`) | |
| return false | |
| } | |
| } | |
| console.log(`${num} is a prime number`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| 'use strict'; | |
| // Store initial title to prevent apending to already modified title | |
| const docTitle = document.title; | |
| let lastUnreadCount; | |
| // Calling this function will do the work | |
| function checkForUnread() { |