Question 1. What is functional programming?
- 2. Lightweight: It can be executed within the user’s browser without having to communicate with the server, saving on bandwidth.
Question 3. How is prototypal inheritance different from classical inheritance?
Answer: The major distinction between prototypal inheritance and classical inheritance is:
Classical Inheritance: A constructor function instantiates an instance via the “new” keyword. This new instance inherits properties from a parent class.
Prototypal Inheritance: An instance is created by cloning an existing object that serves as a prototype. This instance is generally instantiated using a factory function or “Object.create()”. The instance can benefit greatly with selective inheritance from different objects.
Question 4. Which are the different types of prototypal inheritance?
Answer: The three types of prototypal inheritance:
- 1. Delegation
- 2. Concatenative
- 3. Functional
Question 6. What are two-way data binding and one-way data flow, and how are they different?
Answer: Two-way data binding means that the UI fields and the model data are connected to each other in such a way that when one changes, the other changes with it.
One-way data flow is the model that represents single source of truth.
- 1. Boolean
- 2. Function
- 3. Number
- 4. String
- 5. Object
- 6. Undefined
Question 8. What is the use of isNaN function?
Answer: The isNan function can be used for returning true if the argument is not a number. When the argument is not true, it returns false.
Question 10. What is negative infinity?
Question 12. What are global variables?
Answer: Global variables are those that are available throughout the length of the code, that is, these have no scope.
Question 13. What is a prompt box?
It is a text box where users can provide input. Label and box will be provided to enter the text or number.
‘This’ keyword refers to the object from where it was called.
Question 15. What is the difference between ViewState and SessionState?
Answer: The difference between ViewState and SessionState is:
- 1. ‘ViewState’ is specific to a page in a session.
- 2. ‘SessionState’ enables a user to access user specific data across all pages in the web application.
Shape Your Career with QuickStart Training