Taswar Bhatti
The synonyms of software simplicity
Tag: Javascript
Grunt

Sorry for not blogging for a while, have been busy with joining a new company. I wanted to finish up the blog post series with Running Grunt to test your JavaScript application. In this post I will cover using Jasmine and Phantom.js. I have been a big fan of phantomjs a headless browser to test […]

Grunt

Sorry for not posting regularly here, I was on holidays during late December till January, so didn’t get the time or the change to blog, but will get back to the routine of blogging more often. This blog post will be the continuation on Using Grunt. We went through some basic of using Grunt, in […]

Grunt

In this post I will cover some area of grunt more of a grunt basic tutorial, things you can do with grunt, in previous post we saw how we use grunt with Visual Studio 2012 and 2013 and our simple hello world task. Let’s start with some more basic things e.g writing a simple function […]

conversion

In this post I will write about some tips on JavaScript Conversion from type to values etc. Tip 1: Boolean values In JavaScript one can use the double not (!!) to convert a variable to a Boolean. What the !! operator (poor man casting) does is, it first cast the data to a true Boolean […]

javascript

Here is another quick tip on JavaScript, the default value in Javascript. If you are coming from the C# world you may have seen something along the line of

The above code shows the ?? for null coalescing operator in C#, don’t confused it by the generic default value. In JavaScript, there is the […]

Javascript

In JavaScript there are two types of equality operator, the === and the !== , sorry I forgot to mention their evil twin == and != . tsdr; (too short didn’t read) Use three equals unless you fully understand the conversions that take place for two-equals. Basically what the triple equal (===) compares is if […]

Javascript quick tip debugger

Here is Javascript quick tip debugger for Javascript developers, there is a debugger statement in JavaScript, which invokes any available debugging functionality. e.g setting a break point, and if there is no debugging functionality available the statement has no effect. Let’s say you wish to debug a function

One could then add a debugger; […]

Javascript

Here is another quick tip on creating modular JavaScript, namely function wrappers, or more technically called Immediately-Invoked Function Expression (IIFE). A self-invoking anonymous function runs automatically/immediately when you are create it, but don’t confuse it with document.ready or window.onload. The basic of IIFE is to use a wrapper so that it does not pollute the […]

Javascript

Here is a quick tip for JavaScript falsy conditions for programmers or for people who come from Java or C#. In Java and C# when we thinks of using a compare conditions in a if statements, we tend to use something along the line of:

We tend to bring this baggage of knowledge to […]

Jade

Jade Node.js Template Engine, Include & Template Inheritance Part 6 In this post, I will write about using includes and template inheritance in Jade template engine. You can also check out my previous 5 post on Jade. Jade Node.js Template Engine Part 1 Jade Node.js Template Engine Basics Syntax Part 2 Jade Node.js Template Engine […]

UA-4524639-2