Skip to content

Instantly share code, notes, and snippets.

@igmarin
Last active Aug 29, 2015
Embed
What would you like to do?
first_exercise.js
//my variables to test
var preferred_code_sets = ['set', 'first', 'code', 'a'];
var codes_attribute = {'set': 1, 'dos': 3, 'a': 4};
function codes_attribute(){
{'set': 1, 'dos': 3, 'a': 4};
}
function preferred_code(preferred_code_sets, codes_attribute, value_set_map=null){
var code_value = function(code_attributes){try {
if (codes_attribute == null) {
codes_attribute = "codes"
}
if (value_set_map == null) {
value_set_map = nil
};
}};
//Working on another file the loop to do the check for elements on the array for preferred_code_sets and value_set_map
var matching_code_sets = new Array();
for (var i = 0, l = preferred_code_sets.length; i < l; i ++) {
for(var index in codes_attribute){
if(preferred_code_sets[i] == codes_attribute[index]){
matching_code_sets.push(codes_attribute[index]);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment