Prototype in Javascript

What is prototype in JavaScript? An encapsulation of properties that an object links to. Simply put it allows you to share functions or properties with every single object of some specific type. Now every JavaScript object has a prototype. The prototype is also an object. All JavaScript objects inherit their …

Debug Postman

Recently, I came across a situation when I wanted to see the result of console.log written as a part of Postman script. I could not see any outgoing call or console logs in a console of my chrome. After a bit of research it is understood that there is a …

How to create jquery Plugin?

Idea behind this plugin is to catch any event on <a> link and open the URL on new screen. /*! jQuery anchormaaster Plugin – v1.0 – 18/2/2014 * Copyright CM (c) 2014 codebased@hotmail.com; Licensed MIT */ (function ($) { // function that go through each link available in the given …

How to Extend string object in JavaScript?

$(function () { // — DOM is ready to action on. /* Summary: startsWith should take a single argument and return true if the provided string is a prefix of this. */ if (typeof String.prototype.startsWith !== ‘function’) { // checked and there is no startsWith (pre-defined) method. String.prototype.startsWith = function …