<$BlogRSDURL$>

Monday, May 10, 2004

Javascirpt : Lull in Progamming, Busy with Word 

There has been quite a down-time with programming nowdays, which can change today. Plus might be leading a team also in next project. Yipee! High hopes. ;) Most of the recent time has been spent writing documentation and debugging codes of other people with minor errors, but javascript always seesm to surprise me in the amount of pre-built functions available. Well, may be because I have never used it too heavily. I always find server-side work more pretty (and easy) because of richness of data-types. Still managed to learn a few new things because sometimes have to do things in js because of client demands or performace (client vs server side).

I found a way to limit or extend the floating point variables to particular number of numerals after the point, which was new to me. No more substrings and keeping track of positions.
Var1= Var1.toFixed(2);
Particularly useful if say you are comparing string to a number, which can happen more often than not, if you are doing javascript checking. Just think, if you are comparing 25.00 in string to 25.0 which if float and things would not match up. Then things like this help.

Another thing is javascript functions fail totally without any warning leaving you in middle of a guessing game. Sometimes, had a tough time figuring the errors, but largely things were alright because the programs were not too buggy.

This page is powered by Blogger. Isn't yours?