I'm getting an error when I test the following code in Safari.
var temp_color = null;
    var temp = 0;
    var tempv = 0;
    for (let x in colorblock) {
        temp_color = colorblock;
        tempv = Math.pow((color.r - temp_color.r), 2) + Math.pow((color.g - temp_color.g), 2) + Math.pow((color.b - temp_color.b), 2);
        if (x === 0) {
            temp = tempv;
Safari throws the error "Unexpected use of reserved word 'let' in strict mode" but it does work when I use Chrome.
let is not supported in Safari 9 or iOS Safari 9.2:
http://caniuse.com/#search=let
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With