Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create MCQA for the topic: DOM Object and Window Object #56

Open
3 tasks
kirandash opened this issue Jun 11, 2023 · 0 comments
Open
3 tasks

Create MCQA for the topic: DOM Object and Window Object #56

kirandash opened this issue Jun 11, 2023 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kirandash
Copy link
Member

Please create an MCQA to be added as question number 43.

The multiple choice question should be on the topic "DOM Object and Window Object ". The difficulty level should be "Easy/Medium"

Tasks:

  • add your code to 043 folder under code
  • add your question to 43 in README.md file
  • create a video explanation and upload on YouTube (optional)

Explanation:

  • window: global object
    • usage: window.document or document since window is global object we don't need to use window.
    • Ex: setInterval is method of window object and can be accessed as window.setInterval() or setInterval()
    • other window props: window.location, window.href
  • BOM: Browser obj Model: screen, locator, navigator, frames, history, XMLHttpRequest
  • Document: is an obj of window.
  • DOM: html, head, body etc

image

Qns that are asked in interviews:

  • What is the difference between window and document ?
  • What is DOM [Document Object Model] or DOM API ?
  • What is BOM [Browser Object Model] ?
  • Explain the difference between DOM and BOM ?
  • Which is the global object in browser ?
  • How will we check the innerWidth and innerHeight of window ?
    • ans: window.innerWidth or window.innerHeight
  • How will you get hostname or value typed in address bar ?
    • ans: window.location
@kirandash kirandash added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant