JavaScript is not only for webpages and web applications. Among other things, You can create realtime applications, serverside solutions, desktop and mobile applications. There are two types of moble applications: running in browser and native ones. These latter are often faster and more powerful. That’s because they have access to filesystem, accelometer, camera and et ceatera. Native applications are usually written in phone-specific language like Objective-C or Java, hence stanalone programmers generally choose HTML+CSS+JavaScript solutions. Happily, thanks to lastest technology, we are able to easily transform browser application into truly native one.
More Information: http://blog.frontendforce.com/2010/05/mobile-application-development-using-javascript/