What is JavaScript?
JavaScript is a Scripting Language that allows you to build
complex features on the web page. Like for example, displaying constant and
timely images, updates, interactive maps, graphics, videos, and many more such
features that are more than just static information. Moreover, JavaScript allows
you to do things like-
(i) Store values inside variables
(ii) Running codes on web pages simultaneously when certain events are occurring
on the web page.
Moreover, APIs (Application Programming Interfaces) provides
extra functions to JavaScript so that they can function well.
Moving on, now when you have a brief idea of what is JavaScript
and how it functions. We will further discuss the top 10 interview questions
that you might face in an interview.
Well, grab a pen and a notebook and let’s get started –
1.
Do you know the difference between Java and
JavaScript?
- Java is an OOP Programming Language that creates applications to run in a
virtual machine or a browser and its codes needs to be complied whereas
JavaScript is a scripting Language whose codes are run on browser only and its
codes are in a form of a text.
2.
What Data Types are supported by JavaScript?
- JavaScript supports data types like:
(i) Undefined
(ii) Null
(iii) Boolean
(iv) Object
(v) Number
(vi) String
(vii) Symbol
3.
Is JavaScript case-sensitive?
- Yes, it is a case-sensitive language. It must be typed with the
capitalization of letters.
4.
What is Call Back in JavaScript?
- It is a plain JavaScript function that
is executed after the previous function has completed its execution.
5.
What are Attributes and Property?
- Attributes provides more details on
elements like id, type, value etc. whereas Property is the value that is
assigned to the property like type = text, Value = Name etc.
6.
Name some of the Frameworks used by JavaScript.
- Some of the frameworks used by JavaScript are -
(i) Angular
(ii) Vue
(iii) React
7.
What is NaN in JavaScript?
- NaN is the abbreviation for Not a Number in JavaScript. It indicates an error
condition for a function that should return a valid number. When string is
converted into a number then it shows error, there we can see NaN in JavaScript.
8.
What is Local Storage and Session Storage in
JavaScript?
- Local Storage in JavaScript - The data is not sent back to the server for
every HTTP request thus reducing the traffic between the client and the server.
You need to clear the settings or programs to remove it.
Session Storage in JavaScript - It is
mostly like the Local Storage except for the fact that data stored in Session
Storage has an expiration date. The data gets cleared when the page session
ends.
9.
How many ways are there in which a JavaScript
code can be involved in HTML file? Name them.
- There are three ways in which a JavaScript code can be involved in HTML file
and they are -
(i) Inline – Assigned to variable at runtime.
(ii) Internal – You can have the script integrated on the page that you are
working on.
(iii) External – You can have the script integrated on a separate file .
10.
Define Variables in a JavaScript.
- Three variables in a JavaScript are-
(i) Var – It is used to declare a variable and we can initialize the value of
that variable.
(ii) Const- It doesn’t allow to modify the object on which they are called and
can be called on any type of object.
(iii) Let – The variable can be reassigned and used only in block it’s defined
in.
With this, we come to an end of this blog.
We hope that this will help you in preparation for your
interview. Also, remember that good preparation can make you look confident.
All the Best!
Check our course on Java – Java Programming Language and
enroll today at an affordable price!
If you have any doubt regarding the course or syllabus, feel
free to contact us. Drop a message or call us and our professionals will get in
touch with you as soon as possible.
Edustrom provides
you a with a platform to learn various Android Development and helps you master
them within a limited time frame like ( i ) String Handling, ( ii ) Swing, (
iii ) Layout Management, ( iv ) Applet ( v ) JDBC, ( vi ) Java new features,
and ( vii ) OOPS Concept.
Why Choose Edustrom?
Edustrom provides you intricate details about the Java course. Also, we make
you future ready by giving you industrial training and a chance to work on the
live ongoing projects. So, your knowledge can excel with the experience. We
also provide you with a certificate stating that you are now ready to enter the
industrial world. And moreover, we have a team of experts to look after your
query and doubts round the clock.