In a file I am looking at, I saw a || statement in a javascript function call what does it mean?
createObject(a_variable || b_variable)
Does the function take in a true/false value or it take in something else?
is the above code equivalent to
createanotherObject(a_variable ? a_variable : b_variable)
Which I saw right next to it.
Yes. They both do almost exactly the same thing (the first one is slightly more efficient). It’ll pass the first truthy value (or the last one – if none are truthy).
Your code is equivalent to this: