FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour JavaScript is a case-sensitive language
Posts: 7020
Joined: Fri Oct 07, 2005 07:07 PM

JavaScript is a case-sensitive language

Posted: Fri May 01, 2020 08:44 PM

JavaScript is a case-sensitive language. This means that the language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.

So the identifiers Time and TIME will convey different meanings in JavaScript.

NOTE − Care should be taken while writing variable and function names in JavaScript.

Posts: 1713
Joined: Tue Oct 28, 2008 06:26 PM

Re: JavaScript is a case-sensitive language

Posted: Fri May 01, 2020 09:02 PM

Thanks Otto

Saludos,



Adhemar Cuéllar

Posts: 7020
Joined: Fri Oct 07, 2005 07:07 PM

Re: JavaScript is a case-sensitive language

Posted: Wed May 26, 2021 03:23 PM

ReferenceError: Console is not defined

Always write 'console' with a lowercase 'c' because JavaScript is a case sensitive language.

Posts: 592
Joined: Tue Mar 14, 2006 11:34 PM

Re: JavaScript is a case-sensitive language

Posted: Sat Jun 26, 2021 03:34 PM

That's right Otto,
It is a case-sensitive language and it has several "funny" more things :

  • Arrays, months, strings, etc starts with index 0 (zero) and drives you crazy at begining ;)
  • Semicolon ( ; ) is to finish an statement in FW is to continue next line with curent command
  • Because index zero length() is equal to : array's / string's length + 1
  • and others...

However it has some stuff I just love it : Methods !!!
FW :
local cUsrName := "juan perez"
JS :
var cUsrName = 'juan perez';

To change it
FW:
cNwName := Upper( cUsrName )
JS:
cNwName = cUsrName.toUpperCase();

To know how many chars
FW:
nChars := len( cUsrName )
JS:
nChars = cUsrName.length;

And off course you can concatenate several methods in one single line : aNames = cUsrName.toUpperCase().split(' ');

I'm not saying JS is better language than FW, it has several downside too, but I really enjoy programming with both, in my app's new release I got my beloved FW and JS working together as one !

PD : It is NOT a very difficult language to learn and use for web programs, I'm sure you already know this because I saw some posts of you talking about JS, Html, Css, Php right ?
( It's been a looong time I don't post any message in the forum so I say Hello to all old friends and new ones !! )

Saludos / Best regards

FWH 10.6 + xHarbour + Borland 582

Continue the discussion