1 / 18

Javascript Question & Answers

Javascript This Most I.M.P Question And Answers

Savant000
Download Presentation

Javascript Question & Answers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WHAT ARE GLOBAL VARIABLES? HOW ARE THESE VARIABLE DECLARED? THERE IS NO SUCH THING AS HOPELESS SITUATION. every SINGLE CIRCUMSTANCE OF YOUR LIFE CAN CHANGE. YOU ARE BRAVER THAN YOU BELIEVE STRONGER THAN YOU SEEM AND SMARTER THAN YOU THINK

  2. ASK BELIEVE RECEIVE 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 setTimeout, setInterval, and clearInterval. The setTimeout(function, delay) :- function is used to start a timer that calls a particular function after the mentioned delay. The setInterval(function, delay) :- function repeatedly executes the given function in the mentioned delay and only halts when canceled. The clearInterval(id) :- function instructs the timer to stop.

  3. ASK BELIEVE RECEIVE It can be done in the following way: document.getElementById("myText"). style. fontSize = "20"; or document. getElementById ("myText"). className = "anyclass";

  4. ASK BELIEVE RECEIVE 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;"

  5. ASK BELIEVE RECEIVE The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter. The second parameter is the base of the given string. To convert 4F (or base 16) to integer, the code used will be – parseInt ("4F",16);

  6. 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 two variables are different.

  7.  WHAT DO YOU MEAN BY NULL IN JAVASCRIPT? The NULL value is used to represent no value or no object. It implies no object or null string, no valid boolean value, no number, and no array object.

  8. ASK BELIEVE RECEIVE The delete keyword is used to delete the property as well as its value. Example var student= {age:20, batch:"ABC"}; Delete student. age;

  9. ASK BELIEVE RECEIVE Undefined value means the :- => Variable used in the code doesn’t exist => Variable is not assigned to any value => Property does not exist.

  10. ASK BELIEVE RECEIVE Alert Confirm and Prompt

  11. ASK BELIEVE RECEIVE All variables in JavaScript are object data types.

  12. ASK BELIEVE RECEIVE THERE IS NO SUCH THING AS HOPELESS SITUATION. every SINGLE CIRCUMSTANCE OF YOUR LIFE CAN CHANGE. YOU ARE BRAVER THAN YOU BELIEVE STRONGER THAN YOU SEEM AND SMARTER THAN YOU THINK

  13. ASK BELIEVE RECEIVE => They are as—Primitive => Reference types Primitive types are number and Boolean data types. Reference types are more complex types like strings and dates.

  14. ASK BELIEVE RECEIVE The onload function is not run until all the information on the page is loaded. This leads to a substantial delay before any code is executed. onDocumentReady loads the code just after the DOM is loaded. This allows early manipulation of the code.

  15. ASK BELIEVE RECEIVE There are mainly four types of loops in JavaScript. => for loop => for/in a loop (explained later) => while loop => do…while loop

  16. for loop Syntax: for(statement1; statement2; statment3) { lines of code to be executed } while loop Syntax: while(condition) { lines of code to be executed } do…while loop Syntax: <pre> do {

  17. THERE IS NO SUCH THING AS HOPELESS SITUATION. every SINGLE CIRCUMSTANCE OF YOUR LIFE CAN CHANGE. YOU ARE BRAVER THAN YOU BELIEVE STRONGER THAN YOU SEEM AND SMARTER THAN YOU THINK

  18. ASK BELIEVE RECEIVE THERE IS NO SUCH THING AS HOPELESS SITUATION. every SINGLE CIRCUMSTANCE OF YOUR LIFE CAN CHANGE. YOU ARE BRAVER THAN YOU BELIEVE STRONGER THAN YOU SEEM AND SMARTER THAN YOU THINK 

More Related