JavaScript is
the scripting language of the Web.JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more.
What Javascript can do?
What Javascript can do? As:
JavaScript gives HTML designers a programming tool JavaScript can put dynamic text into an HTML page JavaScript can react to events JavaScript can read and write HTML elements.
- JavaScript can be used to validate data
- JavaScript can be used to detect the visitor's browser
- JavaScript can be used to create cookies
What is a Javascript statement?
A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do.
What is the difference between XML and HTML?
XML is not a replacement for HTML. XML and HTML were designed with different goals:
1- XML was designed to transport and store data, with focus on what data is.
2- HTML was designed to display data, with focus on how data looks.
The difference is HTML is about displaying information, while XML is about carrying
information.
What is a javascript object?
A collection of data containing both properties and methods. Each element in a document is an object. Using the DOM you can get at each of these elements/objects and do some cool sh*t.
Describe what event bubbling is?
Event bubbling causes all events in the child nodes to be automatically passed to its parent nodes. The benefit of this method is speed because the code only needs to traverse the DOM tree once.
Describe what "this" is in JavaScript?
In JavaScript, 'this' normally refers to the object which 'owns' the method, but it depends on how a function is called.
The 3 equal signs mean "equality without type coercion". Using the triple equals, the values must be equal in type as well.
== is equal to
=== is exactly equal to (value and type)
0==false // true
0===false // false, because they are of a different type
1=="1" // true, auto type coercion
1==="1" // false, because they are of a different type
Resources for this answer:
It may depend on what you are using it for. There is some debate on this but generally a good question to ask to get an understanding of the JS knowledge.
Answers:
Closures are expressions, usually functions, which can work with variables set within a certain context. Or, to try and make it easier, inner functions referring to local variables of its outer function create closures.
Resources for this answer: