"This" is not same as "this"
- Alert Box
- Confirm Box
- Prompt Box
Note that this backslash approach is not necessarily preferred, and possibly not universally supported.
Which keyword is used to print the text in the screen?
Using document.write(), you can print the text in the screen.
Single Line Comments // and Multi-line comments start with /* and end with */.example
Yes. ECMAScript 2015 introduced the const keyword, but it thus far only enjoys a smattering of browser .
const CONSTANT_VAR = "some-value";
What is === operator?
The "===" operator is a binary logical operator to check whether the two values are same and are of same data type. It will return false even when their values are equal but they are not of same data type.
For ex: 555 and '555', according to the values are same but they are not of same data type, hence === will return false.example
The above code return false
Primary Data Types
Composite Data Types
Special Data Types
null is an assignment value. It can be assigned to a variable as a representation of no value:
How to disable an HTML object ?
A disabled element is unusable and un-clickable. Disabled elements are usually rendered in grey by default in browsers to enable
If you want to access any element in an HTML page, you always start with accessing the document object.
Finds the element with id="foo":
The getElementById() method returns the element that has the ID attribute with the specified value.
What does the "Access is Denied" IE error mean?
The reason is that Windows blocks one window or frame accessing another window or frame that is in a different domain.
The window object also has a screen object with properties describing the physical display. It can be used to display screen width, height, colorDepth, pixelDepth etc.
What are the decodeURI() and encodeURI()?The encodeURI() function is used to encode a URI. It assumes that the input is a complete URI that might have some characters which need encoding in it. If you pass the result to decodeURI , the original string is returned.
Difference between window.onload and onDocumentReady?The onDocumentReady allows you to execute code when only the DOM tree has been built, without waiting for images to load, while window.onload will wait until all assets have finished downloading, such as images and scripts.
The valueOf() method is used to get the primitive value of a string Object. This value is equivalent to ring.prototype.toString().
Base(optional): An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the above mentioned string.example
- What is noscript tag?
- Difference between '=', '==' and '===' operators?
- What is Browser Object Model
- How to test a string as a literal and as an object ?
- What is Associative Array? How do we use it?
- What's the Difference Between Class and Prototypal Inheritance?
- Event bubbling and Event Capturing in JavScript?
- What is the difference between .call() and .apply()?
- What is an immediately-invoked function expression?
- What Are RESTful (REpresentational State Transfer)Web Services?
- TypeError: document.getelementbyid(...) is null
- What's the difference between Null and Undefined?