Webtags (preserving history): Difference between revisions

m
Line 717: Line 717:
*The middle parameter is irrelevant in this context, but if the qet was returning multiple results, "limit=1" would stop after first result
*The middle parameter is irrelevant in this context, but if the qet was returning multiple results, "limit=1" would stop after first result
*The function takes as its sole parameter an Object, this is what is returned by the api, the selected name can be any variable name
*The function takes as its sole parameter an Object, this is what is returned by the api, the selected name can be any variable name
*In JavaScript if a variable is defined outside the function, then given a value inside the function, that value can be accessed by later code outside the function (in my case by code within the other functions for calculating each derived value)
*The object returned has 3 parameters each in '''attribute=value''' format
*The object returned has 3 parameters each in '''attribute=value''' format
*We find the value in any parameter by using the '''object.attribute''' syntax
*We find the value in any parameter by using the '''object.attribute''' syntax and assign it to the variable already defined
*The console.log command simply outputs all the items in the list within the brackets into the browser console that in many browsers is displayed by selecting '''F12''' on the keyboard
*The console.log command simply outputs all the items in the list within the brackets into the browser console that in many browsers is displayed by selecting '''F12''' on the keyboard


5,838

edits