geekguy / js-gotchas

JavaScript Gotchas and Common Mistakes
5 stars 12 forks source link

### 6. Case Sensitivity #8

Closed sgangadhar02 closed 7 years ago

sgangadhar02 commented 7 years ago

Variables and function names are case sensitive. And, always remember that native javascript function and CSS properties in javascript are camelCase.

getElementById('myId') != getElementByID('myId'); // it should be "Id" not "ID" getElementById('myId') != getElementById('myID'); // "Id" again does not equal"ID"

geekguy commented 7 years ago

@sgangadhar02 - not really a gotcha. This is there in all the languages.