c) Both Lexical and Literal
Explanation: Lexical scoping (sometimes known as static scoping ) is a convention used with many programming languages that sets the scope (range of functionality) of a variable so that it may only be called (referenced) from within the block of code in which it is defined.
2. Which function is used to stop the time logging?
Explanation: The function stopTimeLogging() is used to stop the time logging.The stopTimeLogging() stops the timing data for ad hoc, etc for referencing an uncached document.location.
d) Entire code
4. What is the return data type of the property accept that belongs to the Input element?
Explanation: The accept attribute is used to define the types of files that the control can select. When type is “file”, this property is a comma-separated list of MIME types that specify the types of files that may be selected. The strings “audio/*”, “video/*”, and “image/*” are also legal.
5. What is the purpose of the property width belonging to the ImageData element?
a) Number of data
b) Number of pixels
c) Number of pixels per row of data
d) All of the mentioned
Explanation: Image data element indicates the intrinsic width of the image, in CSS pixels. The width property is used to retrieve or store the number of pixels per row of data.
6. What is the purpose of the adoptNode() method?
a) Removes node
b) Makes it ready for insertion
c) Removes node and Makes it ready for insertion
d) Changes the node
Explanation: This method removes node from whatever document it is currently part of and changes its ownerDocument property to this document, making it ready for insertion into this document. The adoptNode() method adopts a node from another document.The adopted node can be of all node types.
7. What is the function of the method importNode()?
a) Copies without removing
b) Copies and removes
c) Only copies
d) Only removes
Explanation: The importNode() method imports a node from another document.The imported node can be of all node types. The method importNode() copies a node from another document without removing it.
Explanation: The comment node can be created using the method Comment createComment(string data). The createComment() method creates a Comment node with the specified text.
9. How can you dispatch a synthetic event object?
Explanation: When you have created and initialized an synthetic event object, you can dispatch it using the dispatchEvent() method of EventTarget. The dispatchEvent method throws UNSPECIFIED_EVENT_TYPE_ERR if the event’s type was not specified by initializing the event before the method was called, or if the event’s type is null or an empty string.
d) exec(command id)
Explanation: The command can be executed using boolean execCommand(string commandId, [boolean showUI, [string value]]). The execCommand() method executes the specified command for the selected part of an editable section.