KyaPoocha.com

Huge Collection of Interview Questions


‘JavaScript’ - KyaPoocha.com

How do I … with JavaScript/JScript … use the same variable name several times in a script? 

By default all variables in JavaScript are global, meaning they retain their values everywhere in a scripted web page. To make a variable local to a block (such... Read more »

How do I …with JavaScript/JScript … use quotation marks when scripting? 

There are two types of quote mark in JavaScript, the single-quote (’) and double-quote (”). Either can be used to delimit a string literal, or sequence... Read more »

How do I …with JavaScript/JScript … submit forms by e-mail? 

The most reliable way is to use straight HTML via a Submit style button. Set the ACTION of the to a mailto: URL and the ENCTYPE attribute to “text/plain”.... Read more »

What?s relationship between JavaScript and ECMAScript? 

At best, a client-side script can show the visitor how many she has been to the site (storing the count in a local cookie). A count of total hits to the server requires... Read more »

What?s relationship between JavaScript and ECMAScript? 

ECMAScript is yet another name for JavaScript (other names include LiveScript). The current JavaScript that you see supported in browsers is ECMAScript revision... Read more »

What are JavaScript types? 

Number, String, Boolean, Function, Object, Null, Undefined.  Read more »

How do you convert numbers between different bases in JavaScript? 

Use the parseInt() function, that takes a string as the first parameter, and the base as a second parameter. So to convert hexadecimal 3F to decimal, use parseInt... Read more »

What is negative infinity? 

It?s a number in JavaScript, derived by dividing negative number by zero  Read more »

What boolean operators does JavaScript support? 

&&, || and !  Read more »

What does “1″+2+4 evaluate to? 

Since 1 is a string, everything is a string, so the result is 124.  Read more »

How about 2+5+”8″? 

Since 2 and 5 are integers, this is number arithmetic, since 8 is a string, it?s concatenation, so 78 is the result.  Read more »

How to create a function using function constructor? 

The following example illustrates this It creates a function called square with argument x and returns x multiplied by itself. var square = new Function (”x”,”return... Read more »

What does break and continue statements do? 

Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.  Read more »

What does the delete operator do? 

The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword.  Read more »

What is === operator ? 

==== is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion.  Read more »

Page 2 of 8«12345»...Last »