Hello,
Ia am trying to understand by myself some random pages on the net, and I have started with the default firefox 11 start page, which is entirely stored with the installation.
And I have several things I cannot understand at all, especially in the javascript part. I am sorry if my questions will look stupid for you, I am starting to deal with real life programs only now. And they always give me the impression that "yes, you know, this is because they use this extension of the language, which allows this, etc".

For example, here is the beginning of a function:
PHP Code:
function setupSearchEngine()
{
  
gSearchEngine JSON.parse(localStorage["search-engine"]); 
what on hell is "localStorage"? some "tacitly know" table? And especially, why is this "localStorage" not defined anywhere in the "abouthome.js" file? I would understand if there was some library associations at the beginning of the file, but hell no, there is NOTHING in the beginning of the file! You just have to understand, all by yourself, what "localStorage" means, and how comes it is understood by the javascript interpreter as something properly defined, in the PRECISE context...of the firefox start page. How on earth could I find documentation on that, even the mozilla developper network does not feature a link to "explaining the code of existing application parts"... and I would need to repeat that procedure of impossible search for every similar problem I find!

I am asking, how do you, folks, learn web developing when you have absolutely NO friend that knows something in coding, no class lessons about that, and completely specific and obscure things like this that deny all the laws of programming you have ever learned at school??

i know, there must be some dumb reason, as always. I am just too stupid to find it...

here another example:

PHP Code:
let gSearchEngine
and then, without warning:

PHP Code:
let url gSearchEngine.searchUrl
how then does Javascript knows that when it created the gsearchengine object, it was an object of a type that had a "searchurl" field...I am lost there.

Can someone help me and explain why this piece (abouthome.js) of code seems to know things it should not know?

I know these difficulties are probably temporary, and are due to me having to cross the entrance barrier to javascript. Once I will know more, it will become easier to guess things...

Thanks for your help, and sorry for the long message from a beginner!