What you need is the function_exists method
you would use it like this when defining your returnJs
function:
if( ! function_exists('returnJs') ){
function returnJs(){
//Code goes here
}
}
However, better practice would be to just define the returnJs
function in your plugin