What is a cookie?
Ans. A cookie is a piece of data that is stored on your computer to be accessed by your browser. Cookies are saved as key/value pairs.
For Example :
document.cookie="user=Subham";
Why do you need a cookie?
Ans. Cookies are used to remember information about the user. It basically involves two steps,
- When a user visits a web page, the user profile can be stored in a cookie.
- The next time user visits the page, the cookie remembers the user profile.
Ans. Modules refer to small units of independent reusable code and also act as the foundation of many javascript modules that export an object literal function, or a constructor.
Why do you need modules?
- Maintainability
- Reusability
- Namespacing
What is the scope in javascript?
Ans. Scope determines the visibility of variables and other resources in areas of your code.
Comments
Post a Comment
Please do not enter any spam link in the comment box.