Recommended Posts

ACKNOWLEDGMENT and RESULTS: Let me begin by announcing my success in having merged Matomo and wordcount2.js into a dynamically loading word cloud that reflects visitor use of Grammar Captive's local search engines. It is a little slow in loading, but unfortunately everything related to Matomo is slow at this point -- this, despite my recent server upgrade that has sped everything up.

If you would like to see the result, simply click on the menu option Word Cloud under Visitor Profile in the navigation bar on the Grammar Captive mainpage. And, now back to Javascript. Thank you everyone for your effort.

BACKGROUND: In an effort to distinguish between visitor desire and Grammar Captive's ability to meet this desire, I am seeking to create another word cloud that measures only visitor behavior. The aforementioned word cloud reflects a matching of visitor desire with Grammar Captives ability to match it. It is not a true reflection of visitor desire. In order to achieve this latter I must count not the number of hits that visitors receive when they make a search, rather I must count the number of searches for a particular item. In order to do this I found a function on Stack Overflow that will likely be of help, if only I could understand it.

MY QUANDARY: The condition of the above function's if-statement appears to be self-defeating. Still, the function works, for I have tested it with my own data. Specifically, the variable testObject appears to contain an undefined object. It would appear then that the condition of the if-statement would always return false. As this is definitely not the case, I am at a loss as to how to interpret the condition.

QUESTION: How is it that testObject can be empty and the condition still return true?