var myName = "Richard";
function myName () {
console.log ("Rich");
}
console.log(typeof myName)
////output is string
but when i code function in other way like in above code, giving different output
var myName = "Richard";
myName = function() {
console.log ("Rich");
}
console.log(typeof myName)
////output is function