This is the updated version which includes a more modern syntax and just better overall
structure now. I have a lot of JavaScript courses and tutorials on my channel, but this is
definitely the first one to watch if you are looking to learn JavaScript. So this will get you
started with the basic syntax and all the fundamentals. I’m going to go over what we’ll
cover in this crash course in a minute.
JavaScript is the language of the front end, meaning the browser, but you can also run it
on the server for more powerful things like interacting with databases and stuff like that.
That’s done by using a JavaScript runtime called Node.js, which is beyond the scope of
this tutorial. I do have a 21-hour course on Udemy called Modern JavaScript from the
Beginning that I’ll put in the description. It aims to learn the fundamentals of JavaScript
so I’m going to go a little faster than usual. Just because there’s so much to cover in
terms of just the fundamentals. I have a four-part course on the DOM using JavaScript
with the Document Object Model (DOM).
Every browser has what are called developer tools and you can use the javascript
console where you can output and you can also run javascript in the console. On
Chrome you can open it with command option I on a Mac you can toggle it that way or
f12 on Windows. There are three ways to set variables in javascript. var lets you set a
variable in a specific location, const is short for constant which means it can't be
changed and can't be reassigned, and we have primitive data types which means that the
data is directly assigned to memory.
We have strings, numbers, boolean, and symbol. We're not going to go over symbols
because it's beyond the scope of this tutorial, but let's create some variables that are
some of these data types.
In the first implementation of JavaScript, values were represented as a type tag and the
value with the type tag for objects being zero and null was represented as the null
pointer. Null is a bogus type of return value so as you can see here that that return value
from type is bogus. Using ES6 or ES2015, we could do console.log and we want to use
instead of quotes backticks. If we want the age variable to stop the string concatenate
and since we're at the end, we just get rid of that and save. Now again, my name is John
and I am 30. This is kind of the old way of doing it.