Javascript Articles, Errors and Fixes

[ Solved – 10 Answers ] JAVASCRIPT – How to Loop through plain JavaScript object with objects as members

PROBLEM How to loop through all members in a JavaScript object including values that are objects. For example, how could you loop through this (accessing the “your_name” and “your_message” for each)? SOLUTION 1: SOLUTION 2: Under ECMAScript 5, we can combine Object.keys() and Array.prototype.forEach(): SOLUTION 3: The problem with this is that we also loop […]

Javascript Articles, Errors and Fixes

JAVASCRIPT – Loop through an array in JavaScript

We programmed in Java, JavaScript, Pascal, ABAP, PHP, Progress 4GL, C/C++ and possibly a few other languages. Each of these languages share many of the same basic concepts. Such concepts include procedures / functions, IF-statements, FOR-loops, and WHILE-loops. A traditional for-loop A traditional for loop has three components: The initialization: Multiple variables can be declared […]

Javascript Articles, Errors and Fixes

JAVASCRIPT – Create GUID UUID in JavaScript

GUID : A GUID is Microsoft’s implementation of a unique identifier(UUID). In its simplest form, Guid lets we generate raw GUID formatted strings: Let’s generate a new Guid instance. We’ve now got an object which we can work with programmatically. Lets check the validity of our Guid using the built-in validator: A handy bit of […]