How can you find a client's browser name?
-
client.navName
-
navigator.browser
-
browser.name
-
navigator.appName
D
Correct answer
Explanation
The JavaScript navigator object contains information about the browser, and the appName property specifically returns the browser's name. Option D correctly accesses this property. Options A and C reference non-existent objects, while option B tries to access a 'browser' property that doesn't exist on the navigator object. Note that appName may return 'Netscape' for many browsers due to historical compatibility reasons.