Blog

Archive for the JavaScript Category


JavaScript to Determine If on Apple Device (works on IE 10 and above)
Posted on July 23, 2020 in Apple, JavaScript by Matt Jennings

(function() {
// Detect if Apple device – see:
// https://stackoverflow.com/questions/19877924/what-is-the-list-of-possible-values-for-navigator-platform-as-of-today

// Polyfill for …

Read more


Remove Duplicates from Array in JavaScript
Posted on July 24, 2019 in Algorithms, JavaScript by Matt Jennings

function removeDuplicates(arr) {
var arrNoDupes = [];

// Iterate through array passed in by parameter

Read more


Prime Number Checker in JavaScript
Posted on June 19, 2019 in Algorithms, JavaScript by Matt Jennings

function checkPrime(num) {
var primeCheckerArr = [];

for(var i = 2; i <= num; i++) {

Read more


Find Unique Characters in a String
Posted on June 19, 2019 in Algorithms, JavaScript by Matt Jennings

var string = ‘what a wonderful day it has been!’;

function firstNonRepeatedChar(str) {
for(var i = 0; str.length; i++) {

Read more


Joys of JavaScript (UW Coding Bootcamp Session)
Posted on June 1, 2019 in JavaScript by Matt Jennings

Types of primitive values:

Numbers
Strings
Booleans
undefined
null
Symbol() (ES6)

// confirm only returns a Boolean of true or false
// depending on if I click “Ok” …

Read more

To Top ↑