Created
May 20, 2019 19:40
-
-
Save duncangh/237cd28a57312b433e1acb9d98d77341 to your computer and use it in GitHub Desktop.
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
var get_numeric_table_value = function(id) { | |
let element = document.getElementById(id); | |
return Number(element.textContent) | |
}; | |
let ask = get_numeric_table_value('ask0'); | |
let bid = get_numeric_table_value('bid0'); | |
let avg = (bid + ask) / 2 ; | |
console.log(avg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment