I think it's more like 'check socks if there are in draw - if so put up a flag. If the flag is up, get the socks and...put them onto a tray. If the tray has some socks on it, put the socks on'.
And perhaps there's sarcasm there but I'm not erudite enough to get it, but given this is a learning forum it seems easy pickings.
In Tavi's example, 'localstr' - I assume it's just a name for ease of reading reasons. There's no reference to it in the code sample I can see.
Left to figure it out by myself, I can only guess that 'check item highscore' then sort of 'calls' 'on item highscore exists' by passing it a value, which then triggers the rest of the set. No, this is not immediately obvious, but is still surely due some sarcasm and an extra period all the same, no doubt..
It also seems that now the value is shown to exist, it would perpetually get it from local storage - I don't know if this is an issue, as opposed say to putting it into a global and working from that.
I'm not sure of the point of setting the highscore text in 'on start of layout'.