Quick question from your JS book

In your JS book you devote a chapter about Iffy’s and provide an example - content slider. What’s driving me crazy is a variable called link that uses a property called [itemID]. Is that a built in property to the window object?

The itemID property is a custom one that I defined directly on link. In JavaScript, you can quickly add properties to other objects (you’ve created) by just using them like in that example. For extending built-in objects, you shouldn’t do this. You should extend the prototype as shown later in the book :slightly_smiling:

I am learning so much from you…I can’t believe. Thank you for being you.

Sincerely,
Brad

1 Like

Haha, thanks for the compliment :stuck_out_tongue:

1 Like