TIBCO Software JavaScript Interview Questions Answers

TIBCO Software Most Frequently Asked Latest JavaScript Interview Questions Answers

Which symbol is used for comments in Javascript?

// for Single line comments and

/*   Multi

Line

Comment

*/

What is the difference between ViewState and SessionState?

‘ViewState’ is specific to a page in a session.

‘SessionState’ is specific to user specific data that can be accessed across all pages in the web application.

What is === operator?

=== is called as strict equality operator which returns true when the two operands are having the same value without any type conversion.

Explain how can you submit a form using JavaScript?

To submit a form using JavaScript use document.form[0].submit();

document.form[0].submit();

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

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”).className = “anyclass”;
TIBCO Software Most Frequently Asked Latest JavaScript Interview Questions Answers
TIBCO Software Most Frequently Asked Latest JavaScript Interview Questions Answers

Explain 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

What are all the looping structures in JavaScript?

Following are looping structures in Javascript:

For
While
do-while loops

What is called Variable typing in Javascript?

Variable typing is used to assign a number to a variable and the same variable can be assigned to a string.

Example

i = 10;

i = "string";
This is called variable typing.

How can you convert the string of any base to integer in JavaScript?

The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter, and the second parameter is the base of the given string.

In order to convert 4F (of base 16) to integer, the code used will be –

parseInt ("4F", 16);

Explain the 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.

What would be the result of 3+2+”7″?

Since 3 and 2 are integers, they will be added numerically. And since 7 is a string, its concatenation will be done. So the result would be 57.

Explain how to detect the operating system on the client machine?

In order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used.

What do 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.

What is the function of delete operator?

The functionality of delete operator is used to delete all variables and objects in a program but it cannot delete variables declared with VAR keyword.

What is an undefined value in JavaScript?

Undefined value means the

Variable used in the code doesn’t exist
Variable is not assigned to any value
Property doesn’t exist

What are all the types of Pop up boxes available in JavaScript?

Alert
Confirm and
Prompt

What is the use of Void(0)?

Void(0) is used to prevent the page from refreshing and parameter “zero” is passed while calling.

Void(0) is used to call another method without refreshing the page.

Post a Comment

Previous Post Next Post