Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var s = "Hallo";
- var s2 = s;
- s = s + " Welt!";
- // console.log('s', s);
- // console.log('s2', s2);
- //var x = 0.3;
- //var y = 0.2;
- //var z = y-x;
- //console.log(z);
- document.write(5 / "abc");
- document.write("<br>");
- document.write('19" Effektgerät');
- document.write("<br>");
- document.write("It's my party");
- document.write("<br>");
- document.write('It\'s my party');
- document.write("<br>");
- document.write('Hallo \t\t Welt');
- document.write("<br>");
- document.write('Hallo du\t Welt\nEine neue Zeile');
- document.write("<br>");
- document.write('alpha\\beta');
- document.write("<br>");
- document.write("Hallo " * 5);
- document.write("<br>");
- var s = "Hallo Welt@fhws";
- document.write('slice', s.slice(3,5));
- document.write("<br>");
- document.write('index of @', s.indexOf('@'));
- document.write("<br>");
- var z = "John Chad Anthony Flea";
- var zz = z.split(' ');
- document.write(zz);
- document.write("<br>");
- if (5-3) {
- document.write('true');
- document.write("<br>");
- }
- if (5-5) {
- document.write('false');
- document.write("<br>");
- }
- // Objektbeispiel
- var o = {
- "Name" : "Rolf Schillinger",
- "Strasse" : "Sanderheinrichsleitenweg 20",
- "email" : "rolf.schillinger@fhws.de",
- "x" : function() {document.write('Testfunktion in Objekt')}
- };
- document.write('Objektbeispiel', o);
- document.write("<br>");
- document.write('Objektbeispiel Name', o.Name);
- document.write("<br>");
- o.x();
- document.write("<br>");
- // Array Beispiel
- var a = [1, 5, 10 ,30];
- document.write('Array Beispiel', a);
- document.write("<br>");
- a.length = 2;
- document.write('Array Beispiel 2', a);
- document.write("<br>");
- a[300000] = 50;
- document.write('Array Beispiel 3', a);
- document.write("<br>");
- document.write('Array Beispiel 3', a.length);
- document.write("<br>");
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement