Variables do not have a type, they are just variables. You can also create variables without using a var declaration. The standards are not followed due to old code laying around that many people use. These variables can hold data types that you are familiar with. Capitalization does come into play.
You initialize a variable to "hello", then later set that same variable to 22. This would cause no errors when it was run, but may have logic errors in how the variable is used. However, mixing numbers and strings together will make more strings. In order to convert back you need to use a function parseInt(). This language is very different from Java in this way. The language is weakly typed so that less experienced people are able to easily begin programming in the language.
This site contains many different tutorials and is very popular. Some other similar sites that include JavaScript and HTML examples, tutorials, and guidelines are vitamin, HTML Dog, and A List Apart.
A function in JavaScript can be defined by:
You can do much more with JavaScript, but it is suggested you follow the sites above, as the lecture was going a bit too quick to keep up notes on.