May I ask why you prefer one line of code?
As a human, I prefer readable code. My machine prefers short and fast code (easy to load and execute).
Today minifiers like UglifyJS know how to shorten code, so you can have both and you don't need to worry about this level of detail. I gave your code to UglifyJS and here is the output:
typeof a=="undefined"&&(a=0)
You can try it out here:
http://marijnhaverbeke.nl/uglifyjs
[Update] My personal preference (again with readability in mind) is to use if when there are choices, and || for fallbacks. Your specific example seems to be a fallback (if a doesn't exist or is undefined, then assign to a the value 0), so I'd use ||. As I said in a comment, (var a=0) would make more sense to me in cases where the variable a hasn't been declared yet (I don't know your context).