SyntaxFix
Write A Post
Hire A Developer
Questions
Here is a way to do it that works, but may not be best practise for any language really:
var x,y; x='something'; y=1; undefined === y || (x = y);
alternatively
undefined !== y && (x = y);