Javascript uses {} for Object Notation.
This example illustrate how 'iterating' over the object elements (it's a dictionary!) will only get you the key and not the value.
To get the value, check the second for loop, within draw(). var a = { p1: 5, p2: 20, p3: 25, p4: 45, p5: 70 }; function setup() { createCanvas(100, 100); background(240); for (var item in a) { console.log(item); } } function draw() { for (var v in a) { if (typeof a[v] !== 'function') { var item = a[v] line(0, item, 50, item); } } }