Hi! My name is Paidamoyo-Janet Azehko aka Myles. I'm a newbie web dev on my journey through 100 Days of Code, and this is my third or fourth attempt. I'm not even sure what day that would make this. But the best thing about learning to code is that you never stop trying, so I'm using this as a way to document my journey a little more in depth in hopes that I can keep up and learn something along the way. I hope you'll join me.
Let's start with Variables. Variables are defined by using the var keyword. Variables can different types like numbers, strings or booleans. Number variables can be either integers (whole numbers without a decimal point) and floating numbers (numbers with a decimal point). Variables can also be a boolean, which is either true or false.
Variables can be either undefined or null. An undefined variable is a variable that is a variable that has been used without declaring it first:
var newVariable; console.log(newVariable);
A null variable is a variable that is empty meaning that it hasn't been given any value on purpose.
var emptyVariable = null; console.log(emptyVariable);
This variable will print null.
Alright, that's all for today on my who knows what day this is of #100DaysOfCode.
Top comments (4)
Could you use code highlighting? See this post.
Yes. This would make it easier for all involved. It’s super easy and is done by putting these three of ` above and below your code. You can also put the language in for proper syntax highlighting
This backwards quote thingy is typically on the key with the
Will do!!! This is my first article so glad to learn something new.
Thank you so much for this!!! I was wondering how to do this to make things easier to read.
Will edit and use this in the future.