Skip to content

Instantly share code, notes, and snippets.

Created November 29, 2015 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5fe3545811505e9db3cf to your computer and use it in GitHub Desktop.
Save anonymous/5fe3545811505e9db3cf to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var a = prompt("Vornamen eingeben");
var b = prompt("Nachnamen eingeben");
// Assoziatives Array
/* var c = {Vorname: a, Nachname: b};
document.write("Name: " + c["Vorname"]+" "+" "+ c["Nachname"]);
*/
// Eindimensionales Array
/* var c = [a,b];
document.write("Name: " + c[0] + " " + c[1]);
*/
//Mehrdimensionales Array
var c = [ [a], [b] ];
document.write("Name: " + c[0][0] + " " + c[1][0]);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment