I wrote Console.log(24);
got error then wrote console.log(24); then got output .
means javascript is case sensitive.
yes youāre right JS is case sensitive which means TIME and Time are two different things for JS to handle
JS is case sensitive in all and any cases. let myAge, let myage and let MYAGE are all different variables and the function you are trying to call is console.log() and not Console.log, which will cause an error.
Why canāt we put letters inside the ()? When I put āconsole.log(hi);ā, it gave me an error.
because hi
is now an undefined variable, so either: defined the variable or make hi
a string.
Programming is about problem solving, in on purpose left out the bit how to make it a string.
Donāt worry. stetim94 is correct; it is an undefined variable. Although, that doesnāt exactly help what you are trying to achieve.
To print letters, you have to add a quotation of your choice. Here is a simple example.
console.log(āhiā)
console.log(āhiā)
You can also have numbers within the quotations as well. I did just realize that you posted that question on January 4th, but I still hope that youāre coding! Keep up the great work!
Provided example helps me understand that Javascript is case sensitive.
simple enough? Create a variable and give it any value. Then try to log the variable but changes one of the letters of the variable to uppercase (or lowercase)
you will see that variable names are case sensitive.
When you write console.log(hi);
you are trying to log the keyword hi. However, as hi is neither an inbuilt JavaScript keyword nor a keyword that you created (such as a variable, a function, an object, etc.) you will get an error saying that hi is undefined
. What you are trying to do is to log the text (or string) āhiā, not the keyword. To accomplish this, you must wrap hi in quotation marks - either double or single quotes, like the following: console.log("hi");
I did the same thing. It tells you to get into the habit of putting the ; at the end. It didnāt help that I put a capital C not a loser case c. So yes it is case sensitive
Iām going to be blunt here, I have never heard of a programming language that is taken seriously and yet is not case-sensitive.
JavaScript is no exception to this. It is case-sensitive, along with a lot of other programming languages.
Yes Javascript is case sensitive. If you do for example:.
var javaScript = createFont(āMonospaceā);
textFont = (javaScript);
It would work, but letās say you did this:.
var javaScript = createFont(āMonospaceā);
textFont = (JavaScript);
It would not work, because of the capital āJā in JavaScript on the second example.
its annoying that its case sensitive
Yes, but it looks more organized.
BTW, welcome to the Codecademy community.
I love itās case sentisive!!
JavaScript is Case Sensitive means
All JavaScript identifiers are case sensitive .
But let myName;
is not same as let Myname;
or let MyName;
so Console.log
and console.log
are not same so it will cause an error
The term, case sensitive is not really accurate, though we may contrive it to equate to the real case, which is, JS is character sensitive. It searches in the current namespace and on up the scope chain for the variable or function name it is given. If a complete character match is not found, then it throws an error.
I learned very early on that it is indeed case sensitive. I did remember that simple variations simply donāt work or are very different things to the system.