Author: Saim Khalid

  • Built in Functions 

    Here, you can find all the JavaScript’s built-in methods on the following classes: Number Methods The Number object contains only the default methods that are part of every object’s definition. Sr.No. Method & Description 1 constructor()Returns the function that created this object’s instance. By default this is the Number object. 2 toExponential()Forces a number to…

  • Cheatsheet

    Write On-page JavaScript To add on-page JavaScript in an HTML document, use the following script tag − <script type=”text/javascript”>// Write your JavaScript code here</script> Insert an External JavaScript file You can insert an external JavaScript file in an HTML document using the HTML’s <script> tag by specifying the file path with the src attribute. <script src=”file.js”></script> Printing/Output JavaScript provides…

  • Questions and Answers

    Javascript Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations. Sr.No. Question/Answers Type 1 JavaScript ExamplesThese JavaScript examples are organized by topics and arranged…

  • Style Guide

    A JavaScript style guide is a set of general rules that regulate how to write JavaScript code. These rules can include − which quotes to use, how many spaces to indent, the maximum line length, using single-line comments, marked with //, etc. When any company starts developing a real-time JavaScript project, 100’s of developers work…

  • Performance

    JavaScript is very important in every website today. If JavaScript fails, our website wouldn’t work properly. It is important to focus on the performance on JavaScript as it has impacts on delivering a positive user experience, retaining engagement, and ensuring business success. An optimized JavaScript would ensure the pages load faster and responsive interactions contribute…

  • Debouncing

    While developing the applications, sometimes it is really important to limit the function calls to improve the web application performance. Debouncing is a programming technique that helps in limiting the function calls. Lets learn more about debouncing in JavaScript. What is Debouncing? Debouncing is a simpler way to delay the execution of a particular function…

  • Canvas

    Handling Canvas with JavaScript The HTML <canvas> element can be used to create and draw graphics on the web page. It can draw various graphics or shapes, like lines, circles, etc., on the web page and animate them. You can define <canvas> element in HTML, and after that, you need to use JavaScript to draw…

  • Graphics

    In JavaScript, graphics can be created using the Canvas API. However, developers can also use some other libraries, like p5.js, chart.js, pllotly.js, Google charts, etc., to draw various graphics and charts. Here, we will explore some of these libraries and learn about them with help of some examples WebGL WebGL allows developers to create graphics…

  • Currying

    In JavaScript, currying is a functional programming technique that is used to transform a function that takes multiple arguments into a sequence of functions that each takes a single argument. Currying is mainly used in event handling and to avoid passing the same variable as a function argument multiple times. How to achieve currying in JavaScript? There…

  • Clickjacking Attack

    Clickjacking Attack An attacker employs clickjacking, a form of cyber-attack, to deceive a user into clicking on an object different from their perception; this deception may result in unintended actions. The attacker achieves this by overlaying invisible elements or frames over valid content thus camouflaging the malicious intent or manipulating the appearance of webpage elements…