JavaScript is an easy to learn and easy to use a programming language which has in truth infinite applications. Once you learn JavaScript programming, you have learned something which is used almost everywhere, including web browsers, mobile, games, desktop, virtual reality and much more. JavaScript is an extremely expressive and powerful programming language.
1. What's JavaScript?
JavaScript may be a client-side also as server side scripting language which will be inserted into HTML pages and is known by web browsers. JavaScript is additionally an Object based programming language
2. Enumerate the differences between Java and JavaScript?
Java may be a complete programming language . In contrast, JavaScript may be a coded program which will be introduced to HTML pages. These two languages aren't in the least inter-dependent and are designed for various purposes. Java may be a n object - oriented programming (OOPS) or structured programming language like C++ or C whereas JavaScript is a client-side scripting language.
3. What are JavaScript Data Types?
Following are the JavaScript Data types:
Number
String
Boolean
Object
Undefined
4. What's the utilization of isNaN function?
isNan function returns true if the argument isn't variety otherwise it's false.
5. Between JavaScript and an ASP script, which is faster?
JavaScript is quicker . JavaScript may be a client-side language and thus it doesn't need the help of the online server to execute. On the opposite hand, ASP may be a server-side language and hence is usually slower than JavaScript. JavaScript now's also a server side language (nodeJs).
6. What's negative infinity?
Negative Infinity may be a number in JavaScript which may be derived by dividing negative number by zero.
7. Is it possible to interrupt JavaScript Code into several lines?
Breaking within a string statement are often done by the utilization of a backslash, '\', at end of the primary line.
Example:
document.write("This is \Learn Tut");8. Which company developed JavaScript?
Netscape is the software company who developed JavaScript.
9. What are undeclared and undefined variables?
Undeclared variables are people who don't exist during a program and aren't declared. If the program tries to read the worth of an undeclared variable, then a semantic error is encountered.
Undefined variables are people who are declared within the program but haven't been given any value. If the program tries to read the worth of an undefined variable, an undefined value is returned.
10. What's a prompt box?
A prompt box may be a box which allows the user to enter input by providing a text box. Label and box are
going to be provided to enter the text or number.
11. What's 'this' keyword in JavaScript?
'This' keyword refers to the thing from where it had been called.
12. Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer,
if any?
Timers are wont to execute a bit of code at a group time or also to repeat the code during a given interval
of your time .This is often done by using the functions setTimeout, setInterval and clearInterval.
The setTimeout(function, delay) function is employed to start out a timer that calls a specific function after
the mentioned delay. The setInterval(function, delay) function is employed to repeatedly execute the given
function within the mentioned delay and only halts when cancelled. The clearInterval(id) function instructs
the timer to prevent .
Timers are operated within one thread, and thus events might line up , waiting to be executed.
13. Which symbol is employed for comments in JavaScript?
// for Single line comments and
/* Multi
Line
Comment
*/
14. What's the difference between ViewState and SessionState?
'ViewState' is specific to a page during a session.
'SessionState' is specific to user specific data which will be accessed across all pages within the web
application.
15. What's === operator?
=== is named as a strict equality operator which returns true when the 2 operands are having an equivalent
value with none type conversion.
16. Explain how you can submit a form using JavaScript?
To submit a form using JavaScript use document.form[0].submit();
document.form[0].submit();
17. 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.
18. Explain the way 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 website and Active X objects
19. What are all the looping structures in JavaScript?
Following are looping structures in
For
While
do-while loops
20. Explain the way to detect the OS on the client machine?
In order to detect the OS on the client machine, the navigator.platform string (property) should be used.
21. What does NULL mean in JavaScript?
The NULL value is employed to represent no value or no object. It implies no object or null string, no valid boolean value, no number and no array object.
22. What's the function of the delete operator?
The delete keyword is employed to delete the property also as its value.

Post a Comment