Sunday, August 17, 2014

Javascript variable definition with Swift

Did you know that you can define variables in Swift the same way like in Javascript?

var currentVersion = self.db.version,
    oldVersionString = version! as NSString,
    oldVersion = oldVersionString.doubleValue

The similarity is impressive. Now I'm waiting for a swift to Javascript converter called Swiftscript or Coffeeswift.

No comments:

Post a Comment