Switch statement is one of the several flow controls encountered in programming languages. JavaScript and PHP as loose typed languages have some caveats when it comes to comparison within a switch.
‘JavaScript’ Category
-
JavaScript and PHP switch statement
July 20, 2012 by Dusan Gledovic
Category JavaScript, PHP | Tags: javascript, PHP, programming
-
The Notes on JavaScript – part 1
April 22, 2012 by Dusan Gledovic
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.
- WikipediaJavaScript and ECMAScript are usually considered as being synonyms, but ECMAScript is basically JavaScript subset.
Category JavaScript | Tags: BOM, Browser Object Model, Document Object Model, DOM, javascript
-
jQuery solution for form submitting on enter – the event capturing/bubbling problem
May 27, 2011 by Dusan Gledovic
Problem with form not submitting when Enter is pressed has its background in implementation of event bubbling and/or event capturing. In Internet Explorer events bubbles, on the other hand in other browsers events are being captured and bubbled. Yay!
Category JavaScript, jQuery | Tags: javascript, jQuery, linkedin
-
JavaScript Singleton Design Pattern Demystified
February 7, 2011 by Dusan Gledovic
Singleton is one of the creational design patterns. It serve purpose of “restricting the instantiation of a class to one object”. (wikipedia)
Because of its nature, JavaScript has different way of implementation of the Singleton Pattern than “traditional” object-oriented languages like Java, C#, PHP etc.
Category JavaScript, Object Oriented JavaScript | Tags: design patterns, javascript design patterns, linkedin, object oriented javascript
