B

Babita • 7.70K Points
Tutor III

Q. A JavaScript program developed on a Unix Machine

  • (A) will throw errors and exceptions
  • (B) must be restricted to a Unix Machine only
  • (C) will work perfectly well on a Windows Machine
  • (D) will be displayed as a JavaScript text on the browser
  • Correct Answer - Option(C)
  • Views: 217
  • Filed under category JavaScript

Explanation by: Official MCQ Buddy

JavaScript is a platform-independent and interpreted language, meaning that as long as the browser supports JavaScript, the script will work on any operating system (Unix, Windows, macOS, etc.).

Why the other options are incorrect:

  • (A) will throw errors and exceptions → JavaScript does not depend on the OS, so it won’t throw errors just because it's developed on Unix.
  • (B) must be restricted to a Unix Machine only → JavaScript is not OS-dependent, so it can run on any machine with a browser.
  • (D) will be displayed as a JavaScript text on the browser → If the browser supports JavaScript (which almost all modern browsers do), it will execute the script instead of displaying it as text.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics