Does this not work? I thought that this was valid, but it isn't working.
var items = ["image", "text"];
console.log(this.type)
if(this.type in items){
console.log("here")
}
console.log(this.type) displays image, but here is never displayed.
Am I doing something wrong, or am I thinking of the wrong language?