<commit_before>/**
 * Control structures
 */

var user = {
    username: 'luis',
    role: 'admin'
};

// if
var isAllowed = false;
if (user.role === 'admin') {
    isAllowed = true;
}

// if - else
var a = 1;
var b = 3;
var c = -3;
var max;
if (a > b) {
    if (a > c) {
        max = a;
    } else {
        max = c;
    }
} else {
    if (b > c) {
        max = b;
    } else {
        max = c;
    }
}<commit_msg>Agrego más ejemplos de estructuras de control.<commit_after>/**
 * Control structures
 */

var user = {
    username: 'luis',
    role: 'admin'
};

// if
var isAllowed = false;
if (user.role === 'admin') {
    isAllowed = true;
}

// if - else
var a = 1;
var b = 3;
var c = -3;
var max;
if (a > b) {
    if (a > c) {
        max = a;
    } else {
        max = c;
    }
} else {
    if (b > c) {
        max = b;
    } else {
        max = c;
    }
}

// switch
var level = 'expert';
switch (level) {
    case 'beginner':
        // sentences
        break;
    case 'intermediate':
        // sentences
        break;
    case 'advanced':
        // sentences
        break;
    case 'expert':
        //sentences
        break;
    default:
        //sentences
}

// while
var questionsCounter = 0;
var totalQuestions = 10;
while (questionsCounter < totalQuestions) {
    // sentences
    questionsCounter++;
}

// do-while
var answer = false;
do {
    //sentences
    answer = confirm('Do you want to continue?');
} while (answer);

// for
var i;
var count = 6;
for (i = 0; i < count; i += 1) {
  //sentences
}

// for in
var property;
for (property in user) {
    document.writeln(property);
}

// try/catch
try {
    //sentences
} catch(error) {
    document.writeln(error.message);
}
{'fraction_non_alphanumeric': 0.15767878077373973, 'fraction_numerical': 0.007033997655334115, 'mean_word_length': 1.766612641815235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7181469', 'n_tokens_mistral': 632, 'n_tokens_neox': 621, 'n_words': 186}