Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function getRange(num1, num2){ | ||
if (num1>num2){ | ||
var number1=num2; | ||
var number2=num1; | ||
} | ||
else{ | ||
var number1=num1; | ||
var number2=num2; | ||
} | ||
for(var count=number1; count<=number2; count++){ | ||
console.log(count); | ||
} | ||
} | ||
|
||
var numberBut = document.querySelector("#lognumber"); | ||
numberBut.addEventListener("click", function(){ | ||
var number1 = document.querySelector("#number1").value; | ||
var number2 = document.querySelector("#number2").value; | ||
//alert(getRange(number1, number2)); | ||
}); |