Category: Javascript

JavaScript — How to use the Set object

Chris Green January 8, 2019 No Comments Development, Javascript , ,

JavaScript has an object called Set which will store any type with unique values — this can be a primitive value type (e.g. string, number, boolean, null, undefined, symbol) or even an object reference. Because a value in a Set may only occur once, it will eliminate duplicates when you add them. Use the .has() […]

Electron Error: Not allowed to load local resource

Chris Green August 25, 2018 No Comments Development, Javascript , , ,

I’ve recently begun playing with Electron (the library that lets you build cross-platform desktop apps with web technologies). And not long into trying to hook up my default HTML page I received this error: Not allowed to load local resource I was certain I’d typed the line to load the URL just like the tutorial […]

What is the JavaScript ternary operator?

Chris Green August 21, 2018 No Comments Javascript , ,

The ternary operator is a JavaScript Operator which will return one of two values depending on a conditional supplied. Basically, you supply any conditional which will evaluate out to true or false and it will return one of the two expressions. It is set  up as such: condition ? expression1 : expression2 If the condition […]

Page 1 of 1