Q. What will be the output of the below code ?

Code:
var package;
console.log("Package: " + package)
console.log("Amount: " + amount);
  • (A) Package: undefined; An ReferenceError is thrown saying amount is not defined;
  • (B) Package: null; An ReferenceError is thrown saying amount is not defined;
  • (C) Package: undefined; Amount: undefined;
  • (D) Package: null; Amount: null;
πŸ’¬ Discuss
βœ… Correct Answer: (A) Package: undefined; An ReferenceError is thrown saying amount is not defined;

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
183
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
82%
Success Rate