var crane = { distance: function regDistance(x) {
var ar = [12,
12,
8,
25,
26,
20];
return ar[x];
}}
var DISTANCE = [12, 8, 26, 20];
var crane = { distance: function regDistance(x) {
return DISTANCE[x];
}}
//DISTANCE.length - длина массива