Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Quiz Submission #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ submit.addEventListener("click", validateForm)
treeHeight.addEventListener("keydown", returnCheck)
treeChar.addEventListener("keydown", returnCheck)

// Assigning input values to an object after event validation and passing to the buildTree function
// Assigning input values to an object after event validation

function treeCapture() {
var tree = {
Expand All @@ -26,8 +26,8 @@ function validateForm() {

// Function to check whether the enter key was pressed

function returnCheck() {
if (event.keyCode === 13) {
function returnCheck(e) {
if (e.keyCode === 13) {
validateForm();
}
}
Expand Down