function initConsole() {
var console = document.createElement('div');
console.id = 'errorConsole';
document.body.appendChild(console);
}
function writeToConsole(message){
var newMessage = document.createElement('p');
newMessage.innerHTML = message;
var console = document.getElementById('errorConsole');
console.appendChild(newMessage);
}
<script type="text/javascript">
$(document).ready(function () {
initConsole();
var browerObj = identifyBrowser();
if (browerObj.browser == "IE") {
writeToConsole("1234");
} else {
console.log("1234");
}
})
</script>