I have written 2 javascript function but they are not working as same.
console.log(func2());
is undefined. Can anyone tell me why and how to solve this?
function func1()
{
return {
bar: "hello"
};
}
function func2()
{
return
{
bar: "hello"
};
}
console.log(func1());
console.log(func2());