Reputation: 55
class helloworld
{
constructor(public message: string){}
}
var hello = new helloworld('hello vishal');
Console.log(hello.message);
I am getting this error at Console.log statement you can see the error clearly in the image i posted below
Upvotes: 2
Views: 6821
Reputation: 22041
You have typo in your script. JavaScript is Case sensitive. Enter:
console.log(hello.message);
Instead Console.log(hello.message);
Upvotes: 8
Reputation: 950
You should write
console.log(hello.message)
JS is case sensitive.
Upvotes: 2