JavaScript

JavaScript Objects, Unary Operators and Logical Operators

JavaScript uses the increment (++) and decrement (–) on all data types. Putting the operator before the variable will change the value before the final evaluation of the statement. Putting the operator after the variable will change the value after the evaluation. Using the increment/decrement operator on a string first converts the value to a

JavaScript Objects, Unary Operators and Logical Operators Read More »

JavaScript Numbers: Number(), parseInt(), parseFloat()

JavaScript’s NaN stands for ‘Not a Number’. This is used when an operation that should have returned a number has failed. NaN used in any operation will always return NaN. NaN is not equivalent to any value, including itself. (NaN == NaN) returns false. You can test this value with the isNaN() function. Booleans, strings

JavaScript Numbers: Number(), parseInt(), parseFloat() Read More »

JavaScript Variables: Initialization, Booleans, and Numbers

Uninitialized variables show as a type of undefined. So do variables that haven’t been declared at all. We should always initialize variables so that we know that undefined means we haven’t declared the variable. null is an empty object pointer. We should initialize objects to null so that the typeof will return the correct data

JavaScript Variables: Initialization, Booleans, and Numbers Read More »

JavaScript Identifiers and Conventions

Everything in JavaScript is case-sensitive. Characters in an identifier name (variable, function or property) can be letters, numbers, underscore or dollar sign. The first character can not be a number. Of course, keywords can not be used as identifiers. Using camelCase for identifiers is the best case practice. Comments in JavaScript are // for single

JavaScript Identifiers and Conventions Read More »

Displaying Notifications from your Website on your Mac Desktop – Hooks

I found a cool little tool that lets me add notifications to my desktop from my websites – Hooks. It was easy to install and get working. After I downloaded the Mac app which gave me my API key, I included the javascript file in my html page. Now I can use one small javascript

Displaying Notifications from your Website on your Mac Desktop – Hooks Read More »

Hiding my Pop-up When a Visitor Returns if They've Chosen Not to See it Again

I mentioned the sliding pop-up that my client wanted on her page here. I fixed it where it would pop-up – or slide in – every time someone visited the home page. After the first couple of visits, I was irritated by the pop-up and didn’t want to see it again. I assume that other

Hiding my Pop-up When a Visitor Returns if They've Chosen Not to See it Again Read More »

Scroll to Top