I've come across the following code:
var x = document.getElementById(this.id + "autocomplete-list");
if (x) x = x.getElementsByTagName("div");
... and would like to understand this particular bit of the above code
What does the following bit mean? I've never seen logic like this before.
if (x) x =
Is this a comparison / some kind of logical operator? I'm wondering if it's a way to detect whether x is NULL and so get information from the immediate parent element. Nevertheless, I'd like to understand what it means.
If so, in 'long English', what does it mean?