Simply use:
if ( age == null || name == null ){
// do something
}
Although, if you’re simply testing to see if the variables have a value (and so are ‘falsey’ rather than equal to null
) you could use instead:
if ( !age || !name ){
// do something
}
References:
solved How to write OR in Javascript?