100%
|
Post by Aaron on Apr 19, 2005 5:40:17 GMT -8
Couldn't think up anything else to name this topic =P
Just thought I'd let you know that I've decided to start coding my variables in lowercase format.. the reason being is because I don't code HTML with caps.
Example:
var TD = document.getElementsByTagName("TD");
I don't code tags like:
<TD>asdf</TD>
----
So I will change to this:
var td = document.getElementsByTagName("td");
because I code HTML like:
<td>asdf</td>
----
It just seems right and more "professional". I don't really know why I'm telling you this, but I kind of felt like it =P
|
|
|
Post by CrAzY_J on Apr 19, 2005 6:12:08 GMT -8
...ok................... maybe we should all tell each other our new ways of coding well i want to use more createElementzors and appendChild instead of innerHTML+="";
|
|
|
Post by Uchiha Susuke on Apr 19, 2005 7:47:46 GMT -8
|
|
|
Post by CrAzY_J on Apr 19, 2005 8:05:42 GMT -8
or when i used to make simple if else functions i used to do if (blah) { var mer = true;} else { var mer = false;} now i do mer = (blah) ? true : false; and now i use dom and better RegExp strings ^_^ I also do that now
|
|
|
Post by Eric on Apr 19, 2005 11:37:43 GMT -8
Couldn't think up anything else to name this topic =P Just thought I'd let you know that I've decided to start coding my variables in lowercase format.. the reason being is because I don't code HTML with caps. Example: var TD = document.getElementsByTagName("TD"); I don't code tags like: <TD>asdf</TD> ---- So I will change to this: var td = document.getElementsByTagName("td"); because I code HTML like: <td>asdf</td> ---- It just seems right and more "professional". I don't really know why I'm telling you this, but I kind of felt like it =P It's not really anything to do with proffesionalism. Many people capitalize certain things, like variable names: FirstName I usually do something like: firstName TD is the abbreviation of table data. So as opposed to TableData it's just TD. There really isn't a reason for doing it in the getElementsBy though
|
|
|
Post by Kenshin on Apr 28, 2005 14:13:20 GMT -8
A thing like to do in Coding is this: var TD = document.getElemensByTagName('TD') to TD = document.getElemensByTagName('TD') just don't put var in front of it
|
|