Q. A JavaScript program developed on a Unix Machine
β
Correct Answer: (C)
will work perfectly well on a Windows Machine
Explanation:
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.