I'm really confused with global variables in javascript. I made a global variable that sits outside of every code. I added stuff to it in one function then I called it in another function to check the length, but the length is zero! I did thorough testing to see if elements were being added and they were. Here are snippets of my code:
window.friendArr = [];
AjaxIM = function(options, actions) {
if(this instanceof AjaxIM) {
var self = this;
// === {{{ defaults }}} ===
//
// These are the available settings for Ajax IM, and the associated
// defaults:
This is the global declaration^
Any input or even a hint in the right direction would be greatly appreciated.