// Function for setting text of an element:
function setText(elementId, message) 
{
    'use strict';
    
     
if ( (typeof elementId == 'string')&& (typeof message == 'string') ) 
   {
      var output = $(elementId);
    if (output.textContent !== undefined) 
     {
      output.textContent = $(elementId).string;
      } 
     else 
     {
      output.innerText =$(elementId).string ;
    }
     
   } // End of main if.
} // End of setText() function.I need help with this code, I need to define a function name the setText() function as shown below, when I run this code in JS Bin the page shows the code won't run, I couldn't find where the error is. Can anyone give me a hint?
 
     
    