We can use Google maps street view to build a simple virtual tour, namely automatically rotating street view panorama. For the setup, we need a specific “div” element holding the panorama. The solution for automatic rotating is using JavaScript “window.setInterval” …

Rotating Street View Panorama using Google Maps Read more »

JavaScript does not have syntax-level encapsulation. All properties of an object are visible. However, there do exist various patterns to ensure data encapsulation. Singletons and the Module Pattern The following code creates one singleton object using an object literal. JavaScript …

JavaScript Encapsulation: Privacy and Data Hiding Read more »

JavaScript is a prototypal object-oriented language, which means objects can inherit directly other objects. This is in contrast with the classical languages such as Java, where a subclass inherits from a superclass, and objects are instances of classes. However, the …

JavaScript Inheritance: Pseudoclassical vs. Prototypal Read more »