I have the hang of basic javascript syntax and am working to understand the language at a deeper level. I am looking at this line of code from the elizabot.js
file in the elizabot.js library:
var global=ElizaBot.prototype.global=self;
- I think that this is setting the global property of the prototype for the Elizabot object equal to "self." Am I understanding the meaning of that line correctly?
- Self does not seem to be a reserved word in javascript. But if I search the Elizabot.js file for the word "self" I can't find it. Is there some special meaning for the word self in javascript? I can't find the declaration.