What is NaN in javascript?
"NaN" is a javascript sentinel object of type Number.The most important remember here is if a varible value is not adequately represented as Number results in NaN.In short, "numeric results that cannot be adequately represented" is NaN. For Exmaple, 0 divided by 0 can not be represented in number so it is NaN.But it's result […]
What is the purpose of atob and btoa method?
“Window” object provides two methods for handling String and Base 64 encoded string. window.btoa() This method is for converting a normal string to Bas64 encodes string. b(Binary string) to a(Ascii base64 string). Example, var bas64string = window.btoa('Sandeep');alert(bas64string);//output U2FuZGVlcA== window.atob() This method is for converting Base64 Ascii string to normal string. a(Ascii base64 string) to b(Binary […]
what is CORS ?
CORS stands for Cross Origin Resource Sharing. This is W3C specification about Cross Domain Ajax Requests in Web2.0. The headers for allowing CORS are:- Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, DELETE Access-Control-Allow-Headers: Authorization Jul 24, 2013Sandeep
what is Chain of Responsibility Design Pattern?
Chain of response yet another popular pattern that can be used in the situation where :- Initial configuration takes more time. Same type of request comes for many time to process. Example, — Printer is perfect real time example for these above scenario. — Printer needs significant amount of […]