Skip to content
  • About’n’Search
  • Datenschutzerklärung // Privacy Declaration

bytes and bones

stuff that matters

Category: JavaScript

Written by #xxaxxelxxApril 20, 2017June 13, 2017

Javascript // searching JSON objects quick // accessing JSON elements

OBJECT: ‘use strict’; var slotIndexes = [ { ‘slot’ : ‘live’, ‘index’: 0 }, { ‘slot’ : ‘achtziger’, ‘index’: 1 }, { ‘slot’ : ‘neunziger’, ‘index’: 2 }, { ‘slot’ : ‘relax’, ‘index’: 3 }, { ‘slot’ : ‘rock’, ‘index’: 4 }, { ‘slot’ : ‘brandneu’, ‘index’: 5 }, { ‘slot’ : ‘black and dance’, […]

Written by #xxaxxelxxFebruary 20, 2015February 20, 2015

JavaScript | Prototypes

http://www.peterkropff.de/site/javascript/prototypen.htm http://www.w3schools.com/js/js_object_prototypes.asp http://www.documentroot.net/allgemein/js-tutorial-klassen-prototypen-oop or the short way: # function A() { this.x = 5; } # function B() { this.y = 6; } # B.prototype = new A(); # var b = new B(); # alert(b.x); // => 5 (huge thanx to Manuel Bleichner)

Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • bytes and bones
    • Join 88 other followers
    • Already have a WordPress.com account? Log in now.
    • bytes and bones
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar