Doubtly
@Doubtly · Joined Feb 2021
- Answers
- 3,792
- Questions
- 4,963
- Upvotes received
- 429
- Explain the difference between potential energy and kinetic energy. Kinetic Energy Potential Energy (i) Kinetic energy is the energy possessed by the body due to its motion. (i) Potential energy is the energy... 1
- Difference between “==” and “===”? “==” checks only for equality in value, whereas “===” is a stricter equality test and returns false if either the value or the type of the t... 1
- How can you convert the string of any base to an integer in JavaScript? The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first paramet... 1
- What is called Variable typing in Javascript? Variable typing is used to assign a number to a variable. The same variable can be assigned to a string. Example: i = 10; i = "string;" This... 1
- What are all the looping structures in JavaScript? Following are looping structures in Javascript: For While Do-while loops 1
- How to read and write a file using JavaScript? There are two ways to read and write a file using JavaScript Using JavaScript extensions Using a web page and Active X objects 2
- How can the style/class of an element be changed? It can be done in the following way: document.getElementById("myText"). style. fontSize = "20"; or document. getElementById ("myText"). clas... 1
- Does JavaScript support automatic type conversion? Yes, JavaScript does support automatic type conversion. It is the common way of type conversion used by JavaScript developers 1
- What is === operator? === is called a strict equality operator, which returns true when the two operands have the same value without conversion. 1
- Which symbol is used for comments in Javascript? // for Single line comments and /* Multi Line Comment */ 2
- What is the working of timers in JavaScript? Timers are used to execute a piece of code at a set time or repeat the code in a given interval. This is done by using the functions setTime... 1
- What is ‘this’ keyword in JavaScript? ‘This’ keyword refers to the object from where it was called. 2
- What is a prompt box? A prompt box is a box that allows the user to enter input by providing a text box. A label and box will be provided to enter the text or num... 1
- Write the code for adding new elements dynamically? <html> <head> <title>t1</title> <script type="text/javascript"> function addNode() {var newP = document.createElement("p"); var textNode = d... 2
- What are undeclared and undefined variables? Undeclared variables are those that do not exist in a program and are not declared. If the program tries to read the value of an undeclared... 1
- Which company developed JavaScript? Netscape is the software company that developed JavaScript. 2
- What is negative Infinity? Negative Infinity is a number in JavaScript which can be derived by dividing negative number by zero. 1
- Which is faster between JavaScript and an ASP script? JavaScript is faster. JavaScript is a client-side language,, and thus it does not need the assistance of the webserver to execute. On the ot... 1