Sitemap
muralikrishna tb

muralikrishna tb

1 min readAug 19, 2019

--

Programming Typescript

Class Variable in the Typescript

C#

C#-Class Variable

Value of the class variable (name) is display in the Console.

TypeScript:

Typescript-Class Variable

Javascript:

Javascript-Class Variable

Output:

Get muralikrishna tb’s stories in your inbox

Join Medium for free to get updates from this writer.

Open the terminal.type the below commands

tsc filename.ts

node filename.js

Output

undefined,undefined

return the undefined Value of the class variable (firstname,lastname)is display in the output(terminal window).Please find the details as below:

1.Return the value is undefined of the class variable,if not initialize the value in the constructor.

2.Default created the parameterless function (foodetails) in the js,if not implement the constructor in the ts.

Return is undefined,if there is no parameter in the foodetails function (FooDetails ()) of the javascript.

--

--