JavaScript is a case-sensitive language

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

JavaScript is a case-sensitive language

Postby Otto » Fri May 01, 2020 8: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.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: JavaScript is a case-sensitive language

Postby acuellar » Fri May 01, 2020 9:02 pm

Thanks Otto
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1643
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: JavaScript is a case-sensitive language

Postby Otto » Wed May 26, 2021 3:23 pm

ReferenceError: Console is not defined

Always write 'console' with a lowercase 'c' because JavaScript is a case sensitive language.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: JavaScript is a case-sensitive language

Postby Raymundo Islas M. » Sat Jun 26, 2021 3: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
User avatar
Raymundo Islas M.
 
Posts: 592
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 7 guests