Vergleich admin/jscripts/codemirror/mode/javascript/typescript.html - 1.8.4 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 28Zeile 28

<div><textarea id="code" name="code">
class Greeter {


<div><textarea id="code" name="code">
class Greeter {

	greeting: string;
constructor (message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}

  greeting: string;
constructor (message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}

}   

var greeter = new Greeter("world");

}   

var greeter = new Greeter("world");

Zeile 42Zeile 42
var button = document.createElement('button')
button.innerText = "Say Hello"
button.onclick = function() {

var button = document.createElement('button')
button.innerText = "Say Hello"
button.onclick = function() {

	alert(greeter.greet())

  alert(greeter.greet())

}

document.body.appendChild(button)

}

document.body.appendChild(button)