Jump to content

Naming conventions for global javascript variables


Recommended Posts

Hi all:

Just wanted to know a bit more about the naming conventions for global javascript variables. If this topic was already covered on the wiki, I appreciate a pointer to it.

In gui/session_new/session.js, I see global variables like g_EntityStates and g_Players that are prefixed by 'g_'. But, In input.js, I see global variables like mouseX and mouseY that are not prefixed.

Is my assumption, that all of the above variables are global, correct?

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...