TypeScript Playground Online Template
Code, Debug, Demo and Learn Easy & Fast with TypeScript Playground Online
interface Person {
firstName: string;
lastName: string;
}
function greeter(person: Person) {
return "Hello, " + person.firstName + " " + person.lastName;
}
let user = {
firstName: "Steve",
lastName: "Jobs"
};
document.querySelector("#root").innerHTML = greeter(user);
<div id="root"></div>
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
html,
body {
font-family: 'Roboto', cursive;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
font-size: 30px;
}