Window Object Basics
Which property of the window object gives access to the browser's viewport inner width in pixels?
- window.innerWidth
- window.frameWidth
- window.widthInner
- window.outerHeight
- window.viewportSize
Navigator Object
What property of the navigator object reveals the name of the browser in use?
- navigator.browserName
- navigator.appName
- navigator.userAgentName
- navigator.application
- navigator.windowName
Screen Properties
To get the full width of the user's screen in pixels, which property is used?
- window.innerScreen
- screen.length
- screen.screenWidth
- window.screenLength
- screen.width
Pop-Up Windows
Which window method can be used to open a new browser window or tab with a specific URL?
- window.create()
- window.popUp()
- window.launch()
- window.spawn()
- window.open()
History Navigation
What is the method to move the browser forward one page in the session history?
- history.ahead()
- history.goNext()
- history.move()
- window.next()
- history.forward()
User Agent Information
Which navigator property contains a string identifying the browser and operating system?
- navigator.userAgent
- navigator.platformAgent
- navigator.deviceID
- navigator.browserCode
- navigator.systemName
Timers: setTimeout
Which timer method runs a function once after a specified delay in milliseconds?
- setTimer()
- setTimeout()
- runAfter()
- timeoutCall()
- setInterval()
Timers: setInterval
If you want a function to execute repeatedly every 500 milliseconds, which method should you use?
- setInterval()
- repeatTimeout()
- runEvery()
- doInterval()
- intervalCall()
Canceling Timers
If you assign a setTimeout timer to a variable called timerId, which method stops it before it fires?
- cancelSetTimeout(timerId)
- stopTimeout(timerId)
- endTimeout(timerId)
- clearTimeout(timerId)
- removeTimer(timerId)
Getting Screen Height
Which JavaScript property retrieves the total height of the user's display screen?
- screen.height
- screen.length
- screen.sizeY
- window.screenHeight
- screen.resolutionY
Detecting Online Status
Which property of the navigator object tells you if the browser is currently connected to the internet?
- navigator.onLine
- navigator.isInternet
- navigator.internet
- navigator.connected
- navigator.onlineStatus
Window Alerts
What is the correct method to display a simple alert dialog to the user?
- window.showAlert()
- window.alert()
- window.wakeup()
- window.notify()
- window.popupAlert()
History Object Length
Which property shows how many entries are in the session history for the current page?
- history.size
- window.historyMax
- sessionHistory
- history.count
- history.length
Clearing Intervals
Given an interval set with setInterval and stored in intervalId, which method would stop it from running?
- cancelInterval(intervalId)
- stopSetInterval(intervalId)
- window.clearInt(intervalId)
- clearInterval(intervalId)
- deleteInterval(intervalId)
Blank Window Reference
What does the window property 'self' refer to in the context of the window object?
- The current window itself
- The opener window
- The main screen object
- The parent window
- A reference to the browser