Quiz: Arrays

What does this program print?

const inventory: string[] = ["Healing Potion", "Silver Sword"];
inventory.push("Old Key");
console.log(inventory.length);
console.log(inventory[1]);

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

6/11