Javascript, Arrays & Werte abspeichern

Tue, 24/07/2012 - 12:43
Body
http://de.selfhtml.org/javascript/objekte/array.htm http://www.hunlock.com/blogs/Mastering_Javascript_Arrays http://www.teialehrbuch.de/Kostenlose-Kurse/JavaScript/12757-Mehrdimensionale-Arrays.html http://stackoverflow.com/questions/966225/how-to-create-a-two-dimensional-array-in-javascript https://developer.mozilla.org/en/JavaScript/Guide/Predefined_Core_Objects#Array_Object Simples array Zahlen = new Array(34, 86, 167, 413); OR
  1. var eu_countries = [
  2.                 "AT",
  3.                 "BE",
  4.                 "BG",
  5.                 "CY",
  6.                 "CZ",
  7.                 ];

Multidimensional associative array

http://stackoverflow.com/questions/4329092/multi-dimensional-associative-arrays-in-javascript

Objects

Tip from PigDude #javascript freenet function ns(path) { return path.split('.').reduce(function(o, part) { return o[part] = {}; }, this); } ns('values_found.homepage.field_url'); values_found.homepage.field_url; usage var ab = ns('a.b'); ab.c = [1, 2, 3], ... would make a.b.c [1, 2, 3]
Webdevelopment
Add new comment
The content of this field is kept private and will not be shown publicly.

Plain text

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <drupal-entity data-*>
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.