<commit_before>'use strict';
// Stephanie Typed render Name submission and remove it function
function renderNameSubmissionForm(){
  var sectionEl = document.getElementById('content');
  var formEl = document.createElement('form');
  formEl.setAttribute('id', 'form');
  var labelEl = document.createElement('label');
  labelEl.setAttribute('name', 'username');
  labelEl.textContent = 'Enter your name to get started:';
  console.log('label content' + labelEl.textContent);
  var inputEl = document.createElement('input');
  inputEl.setAttribute('name', 'username');
  inputEl.setAttribute('class', 'input');
  inputEl.setAttribute('type', 'text');
  inputEl.setAttribute('required', 'required');
  console.log('input content ran');
  var submitEl = document.createElement('button');
  submitEl.setAttribute('type', 'submit');
  submitEl.textContent = 'Go!';
  console.log('submit content ran' + submitEl.textContent);
  formEl.appendChild(labelEl);
  formEl.appendChild(inputEl);
  formEl.appendChild(submitEl);
  sectionEl.appendChild(formEl);
}

function removeNameSubmissionForm(){
  var sectionEl = document.getElementById('content');
  var formEl = document.getElementById('form');
  sectionEl.removeChild(formEl);
}

// Luay Typed render Scenario function
function renderScenario(i) {
  var scenarioEl = document.getElementById('scenario');
  scenarioEl.textContent = scenariosArray[i].scenario;
}

//Luay & Brandon Typed render Answers function
function renderAnswers(i) {
  var answerEl = document.getElementById('answers');
  for (var j = 0; j < 4;j++) {
    var renderP = document.getElementById('render-answer-' + j);
    answerEl.textContent = scenariosArray[i].answerArray[j];
  }
}

//Stephanie created nameSubmissionFunc
function nameSubmissionFunc(event) {
  event.preventDefault();
  event.stopPropagation();
  removeNameSubmissionForm();
  renderScenario(i);
}<commit_msg>added button render to renderScenario<commit_after>'use strict';
// Stephanie Typed render Name submission and remove it function
function renderNameSubmissionForm(){
  var sectionEl = document.getElementById('content');
  var formEl = document.createElement('form');
  formEl.setAttribute('id', 'form');
  var labelEl = document.createElement('label');
  labelEl.setAttribute('name', 'username');
  labelEl.textContent = 'Enter your name to get started:';
  console.log('label content' + labelEl.textContent);
  var inputEl = document.createElement('input');
  inputEl.setAttribute('name', 'username');
  inputEl.setAttribute('class', 'input');
  inputEl.setAttribute('type', 'text');
  inputEl.setAttribute('required', 'required');
  console.log('input content ran');
  var submitEl = document.createElement('button');
  submitEl.setAttribute('type', 'submit');
  submitEl.textContent = 'Go!';
  console.log('submit content ran' + submitEl.textContent);
  formEl.appendChild(labelEl);
  formEl.appendChild(inputEl);
  formEl.appendChild(submitEl);
  sectionEl.appendChild(formEl);
}

function removeNameSubmissionForm(){
  var sectionEl = document.getElementById('content');
  var formEl = document.getElementById('form');
  sectionEl.removeChild(formEl);
}

// Luay Typed render Scenario function; Stephanie placed render answers section inside this function and added DOM for button
function renderScenario(i) {
  var scenarioEl = document.getElementById('scenario');
  scenarioEl.textContent = scenariosArray[i].scenario;
  var answerEl = document.getElementById('answers');
  for (var j = 0; j < 4;j++) {
    var renderP = document.getElementById('render-answer-' + j);
    answerEl.textContent = scenariosArray[i].answerArray[j];
  }
  var submitEl = document.createElement('button');
  submitEl.setAttribute('id', 'submit');
  submitEl.setAttribute('type', 'submit');
  submitEl.textContent = 'Submit Answer';
  scenarioEl.appendChild(submitEl);
}

//Stephanie created nameSubmissionFunc
function nameSubmissionFunc(event) {
  event.preventDefault();
  event.stopPropagation();
  removeNameSubmissionForm();
  renderScenario(i);
}
{'fraction_non_alphanumeric': 0.13746898263027296, 'fraction_numerical': 0.0009925558312655087, 'mean_word_length': 5.998263888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3548872', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1136, 'n_words': 256}