Created
January 25, 2015 10:59
-
-
Save luckyduck/5cd6edcf97b8cb38072e to your computer and use it in GitHub Desktop.
Variablenübung2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Grundlagen der Programmierung - Datentypen</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
// 1. Variablen deklarieren und initialisieren | |
var integerWert = 20; | |
var floatWert = 5.0; | |
// 2. Variablen in einem Array speichern | |
var berechnung = {a: integerWert, b: floatWert, c: (integerWert / floatWert)}; | |
// 3. Ausgabe | |
document.write(berechnung['a'] + " / " + berechnung['b'] + " = " + berechnung['c']); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment