Calling JavaScript functions from TSQL

Why would you ever want to call a JavaScript function from TSQL? It does sound crazy, but there may be a case where you might want to do this. Even if it not for real production use, it might be useful for some test scenarios. And it is very cool and you get to brag…