//save it as TalkingHands.ts
//compile it in command prompt as - tsc talkinghandsts
function TalkingHands(Deaf) {
return "Hello, " + Deaf;
}
var user = "I am a Deaf User";
document.body.innerHTML = TalkingHands(user);
Using Interfaces
interface Deaf
{
name: string; // varibale declaration
}
//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = {name:"I am a Deaf User"};
document.body.innerHTML = TalkingHands(user);
using classes
class DeafBoys
{
question: string;
constructor(public name)
{
this.question = name;
}
}
interface Deaf
{
name: string; // varibale declaration
}
//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = new DeafBoys("Yes I am Deaf user");
document.body.innerHTML = TalkingHands(user);
//compile it in command prompt as - tsc talkinghandsts
function TalkingHands(Deaf) {
return "Hello, " + Deaf;
}
var user = "I am a Deaf User";
document.body.innerHTML = TalkingHands(user);
Using Interfaces
interface Deaf
{
name: string; // varibale declaration
}
//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = {name:"I am a Deaf User"};
document.body.innerHTML = TalkingHands(user);
using classes
class DeafBoys
{
question: string;
constructor(public name)
{
this.question = name;
}
}
interface Deaf
{
name: string; // varibale declaration
}
//paramter deaf -- Interface Deaf
function TalkingHands(deaf:Deaf) {
return "Hello, " + deaf.name;
}
// variable user refers to the name String
//name property of the string
var user = new DeafBoys("Yes I am Deaf user");
document.body.innerHTML = TalkingHands(user);
List of BAMS Colleges in Bangalore, fees structure and admission process. Get More information about the course.
ReplyDeletedirect admission in bams colleges bangalore
List of ayurvedic colleges in bangalore 2020