This file contains hidden or 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
<html> | |
<body> | |
<label>Search</label> | |
<!-- Renders an HTML input box --> | |
<input type="text" id="search-box" oninput="makeAPICall()"> | |
<!-- Displays number of time makeAPICall method is called --> | |
<p id='show-api-call-count'></p> | |
</body> |
This file contains hidden or 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
<html> | |
<body> | |
<button id="click-btn">Click me!</button> | |
</body> | |
<script> | |
var timerId; | |
var clickBtn = document.getElementById('click-btn'); | |
var clickFunction = function(){ |
This file contains hidden or 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
function delayFuncExec() { | |
console.log("I will be called after 100 milliseconds"); | |
} | |
var timerId = setTimeout(delayFuncExec, 100) | |
console.log("Timer Id: " + timerId) |
This file contains hidden or 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
function delayFuncExec () { | |
console.log("I will be called after every 100 milliseconds"); | |
} | |
var timerId = setInterval(delayFuncExec, 100) | |
console.log("Timer Id: " + timerId) |