Read the statement by Michael Teeuw here.
calendar_monthly header still showing
-
Yes true and false in that case are used as a boolean so you don’t use ’ ’ or " " :)
Very often, in programming, you will need a data type that can only have one of two values, like YES / NO ON / OFF TRUE / FALSE For this, JavaScript has a Boolean data type. It can only take the values true or false.I had to learn that too :)
-
@Mykle1 In case you want to know why:
'false'is a string and astringalways represents thebooleantrue, so'test','true'and'false'all become true it doesn’t matter what the content of the string is. -
@strawberry-3.141 said in calendar_monthly header still showing:
@Mykle1 In case you want to know why:
‘false’ is a string and a string always represents the boolean true, so ‘test’, ‘true’ and ‘false’ all become true it doesn’t matter what the content of the string is.So, the single quotes
'are what make it a string? Meaning, whatever is inside single quotes is considered a string?
And if that is so, then what is the wordtrueorfalsewithout the quotes called? A value? A parameter?Obviously, I’m still confused, but thank you for the lesson.
-
@Mykle1 everything in single or double quotes is a string, string is a type for text.
There are multiple types:
- object
{} - array
[] - number
2,-17and3.14 - string
"I am a string"and'me too' - boolean
trueorfalse
- object
-
@strawberry-3.141 said in calendar_monthly header still showing:
everything in single or double quotes is a string, string is a type for text.
Ok, thank you. I do appreciate the information. Some of it is starting to make sense. I’ve learned quite a bit in the short time that I’ve been here.
