A
Q. JavaScript Code can be called by using
- Correct Answer - Option(B)
- Views: 24
- Filed under category JavaScript
- Hashtags:
A
In JavaScript, code can be executed in multiple ways, but the most common and structured way is through functions or methods. A function is a reusable block of code that performs a specific task when called.
Example of Calling JavaScript Code Using a Function:
function greet() {
console.log("Hello, World!");
}
greet(); // Calling the function
Why Not Other Options?
(A) Preprocessor → ❌ Incorrect
JavaScript is an interpreted language, meaning it does not require preprocessing like languages such as C or C++.
(C) RMI (Remote Method Invocation) → ❌ Incorrect
RMI is a Java-based technology used for remote procedure calls, not for JavaScript execution.
(D) Triggering Event → ❌ Partially Correct
Events like onClick, onLoad, etc., can execute JavaScript, but they usually call functions to perform the actual logic.
Final Answer:
✅ (B) Function/Method
You must be Logged in to update hint/solution
Be the first to start discuss.
Discusssion
Login to discuss.