Wednesday, September 9, 2015

Apple September 9 2015 Event – All you need to know

Yesterday Apple announced so much. Rather than writing multiple articles for each of the things announced yesterday I am trying to brief and give you the visuals from the event.

The crowd this time was huge, Tim specially mentioned the Apple Employees presence to the Event.

As Tim Cook did yesterday getting to the point straight way. 
Let’s start

Apple Watch

First thing announced was Apple watch. Apple watch new OS 2 is announced.

 New watch comes with new Faces

 With New OS comes new features
  • Time Travel – time travel is features where you can check the next day events.
  • Transit is added to the Maps.

Few Apps which were Demoed in the event
  • Facebook messenger is coming to Watch later this year.
  • iTranslate – iTranslate can translate update 90 languages and more will be added later.
  • AirStrip

 New Watch band with Leather strip.

Friday, September 4, 2015

Advanced JavaScript Topics Part 2

We were discussing the let keyword in the Part 1 of this series. We discussed what the advantages and how we can use let keyword in the code. However, let keyword has a problem it does not support hoisting, means if you have declared a variable using let keyword in the mid of the block it would not be available in the part above the declaration of the let keyword.
So you always make sure that let is declared at the top of the block.
As we discussed earlier let keyword kind of Hack the scope implicitly. We can always write the code to make sure when we see we can explicitly identify that this block is a scope. The example given the in the Part 1 of this series used the implicit way. To use the explicit way do it like this

function foo(bar) {
    "use strict"
    let (test = bar) {
        console.log(test) // "bar"  
    console.log(baz) // reference error

However, this syntax is rejected by the committee. we can use some other way to make sure we see the block scope in the code as we read the code.

function foo(bar) {
    "use strict"
    /*let */
        let test = bar
        console.log(test) // "bar"  
    console.log(baz) // reference error

This is one way to do it. Keyle Simpson have created this great tool to help you with block scoping it is called Let-er .

So, as we started to talk about tools you might want to take a look at traceur-compiler it generates ES 5 code from ES 6 code. As there is development going on in ES 6 you should start writing your code in ES 6 and use a transpiler to convert the ES 6 code to ES 5. You can use grunt-traceur . Other than this you might wanna take a look at the tools for ES 6.


Hoisting is a concept which is developed to understand how JavaScript works when we declare the variables and functions. Take a look at the code below