content is declared as a function result. In this case it’s a “ternary if” by the looks of it.
That line literally reads
if(text != undefined){
return text;
}else{
return ‘Loading…’
}
Ternary operations tokenize as
condition ? true_val : else_val
As long as the “condition” (thing left of the ternary operator (?)) evals as true then true_val is returned, otherwise else_val is returned .
In Javascript anything that is not defined as false and anything which is not “undefined” will eval as true because (if x) means the same thing as (if x = x)
You don’t see that as much in Javascript, but I’ve seen it used a lot in other C descended languages.
I’ve never seen ** in JS except as part of a /** comment **/ and I didn’t try to run it, but that part doesn’t look like legal code to me. I’m guessing you added those characters to highlight the snippet of code? In C it would be pointer to a pointer. which threw me for a few minutes.