You are on page 1of 1

Q. What exactly do you know about JavaScript?

It is basically an object-oriented programming language that is having a lot of


applications. It can be used for both server side, as well as client-side scripting
and the god thing is it is known to provide the best results in every aspect. When
it comes to building HTML WebPages, this language is often considered and is known
to bring the most desired outcomes.
Q. On a client machine, how you will detect the server using JavaScript?
For this, task, the users can simply proceed with the navigator.app string. The
string performs this task automatically and the user just needs to define it at the
right time. Also, the users need to make sure that the instructions are executed in
the right manner. Sometimes there is need to define the IP or other address of the
server that needs to be detected.
Q. What according to you is the true difference between Java and JavaScript?
Well, there are a few differences that separate both these terms from each other.
Basically, JavaScript is a modified version or a coded version that is generally
considered in the HTML pages while on the other side, Java is a well-known
programming language used to develop applications in almost every category. Both
these languages don’t depend on each other for their task and have separate
applications. Generally, Java is considered as OOPS language while JavaScript is a
scripting language preferred by the clients. Also, JavaScript has wide applications
in HTML WebPages while Java is used mostly in developing computer applications.
Q. If the argument is not a number, which function you will use in the JavaScript?
isNan function is useful in case the argument is not a number. Actually, it remains
true if the argument doesn’t have number while on the other side it remains false
if it is.
Q. Compare ASP Script and JavaScript in terms of speed?
When it comes to speed, both of them are powerful but both have their own limits
that put them separate from one another. JavaScript is known to have the quick
speed for performing the similar functions. This is because JavaScript doesn’t need
the help of a web server to perform the task which is assigned to it. However, ASP
is slow as compare to it. This is because of the very same reason and i.e. it
depends largely on the web server for executing the tasks assigned to it. Although
the server side version of JavaScript i.e. nodejs also exists, still it is known to
provide quick results.
Q. How many data types are there in the JavaScript? Can you name them?
There are 6 data types in the JavaScript and they are:
Function
String
Undefined
Number
Boolean
Object
These data types are very useful and they have applications in almost every
important task performed by the JavaScript.
Q. How can you break the JavaScript code into different lines?
This can be done with the help of a backlash. However, you need to use it at the
end of the initial line otherwise it will show error at the end. The good thing is
there is no limit on lines that can be created for the purpose of accommodating
data. Also, doing this is not at all a big deal and one can easily handle this
task.

You might also like