How to Declare Variables in Javascript

  Рет қаралды 2,923

Coding in Public

Coding in Public

3 жыл бұрын

I’m starting a series for absolute beginners. I’ll add these videos every few weeks and slowly build out a beginner playlist for those new to Javascript.
In today’s video, we’ll walk through a brief overview of the basics of declaring variables in Javascript.
(prefer an article? chrispennington.blog/blog/how...)
TLDR;
1. Use const by default, let when necessary, and var never
2. Name variables with descriptive names in camelCase
3. Assign any value to variables
✌️

Пікірлер: 19
@magic_fruit_bat5003
@magic_fruit_bat5003 3 жыл бұрын
I enjoyed your Gulp/SCSS from start to finish setup. I was actually able to figure it out myself about two days ago but then I ran into your tutorial and it cleared a lot of gaps in my knowledge about the Gulp/SCSS setup. I hope you keep up with this JS series. As a beginner myself, this is extremely useful and helpful. Thank you for taking time to teach and share your knowledge.
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Thanks so much, @Rob Zombee! I’ve been wanting to get back to the Beginner JS series. I was thinking of doing a video on scoping. Anything else you think would be helpful?
@magic_fruit_bat5003
@magic_fruit_bat5003 3 жыл бұрын
@@CodinginPublic A video on scoping would be excellent! So far, I have gone through your videos in JS and they’re making sense to me, and filling some of the gaps in my knowledge. I will have to re-watch the one on you had on THIS to grasp that concept a bit more. I’m curious, how long did it take you to feel comfortable with JS? Are you always looking at the documentation, or personal notes to refer back to when you forget how to do something you haven’t used in a while?
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Great! I’m glad the videos have been helpful! I’ll work on that scoping video soon, then. It can be confusing at first. The THIS keyword probably also deserves its own video at some point. As to my comfort level, I’d say I always feel as though I’m learning more. I think there are at least four keys to learning JS: 1. Consistency (writing some everyday) 2. Documentation (learning how to read docs well) 3. Concepts > syntax (if you focus on concepts, you can always Google syntax; if you know syntax but don't really understand the concepts, it's much harder to google those) 4. Projects from scratch (regularly sit down with a blank file and create a small project-it can even just be something like an action run from a button click. Use only Google for help and look up only individual items, not your specific project. Once you finish, go find a similar project and see what they did differently from you.) I'd say I was feeling mostly confident after 6 months of learning JS, but I still look back every 4-5 weeks and see how I would now do things differently, which seems to be a good sign of growth. Yea, I mostly just live in MDN docs when I'm not sure about something. FWIW, I think Wes Bos’s Beginner JS course is amazing and worth going through. You can read through the entire course at wesbos.com/javascript if you prefer written instruction, but I think the video is well worth it (or you can just start with the free section). (Sorry for the long reply lol)
@magic_fruit_bat5003
@magic_fruit_bat5003 3 жыл бұрын
@@CodinginPublic Thank you for the suggestions and answering my questions.
@Yoitsjomo
@Yoitsjomo 2 жыл бұрын
You know I'm so glad I landed on your channel. This video is very helpful and clear. Thank you.
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Awesome. So glad it was a help. Thanks for taking the time to say something!
@remkospaans
@remkospaans 2 жыл бұрын
Thanks. Very calm and clear explanation. Let's check out the rest of the videos ;-)
@redpeople2192
@redpeople2192 7 ай бұрын
Really well explained thank you.
@CodinginPublic
@CodinginPublic 7 ай бұрын
Glad it was helpful!
@meggines
@meggines 3 жыл бұрын
ok i will try :)
@rawrsophiex
@rawrsophiex 2 жыл бұрын
thanks for the tutorial. you sound like michael scott lol :)
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Haha I’ve gotten that before ha
@personzen8028
@personzen8028 3 жыл бұрын
Keep going bro
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Thanks! Hoping the series I’m able to eventually get together will be a help to beginners especially. Being very new to programming myself I think helps me know what seems confusing? Hopefully 😂
@personzen8028
@personzen8028 3 жыл бұрын
@@CodinginPublic the basics are essential in learning. We tend to not give much attention to them each time we start learning something new, but we end up searching solutions for small stupid bugs. Thats happened to me recently when i had to do a small calculation using js, something like 0.1 + 0.2, and then i figure out that js has an issue with that.
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Completely agree. It’s usually the basics that cause the biggest problems. Once you know the basics you can fix most any bug.
@meggines
@meggines 3 жыл бұрын
i just subscribed :0
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Thanks!!
Learn JavaScript Scoping In 10 Minutes
11:39
Web Dev Simplified
Рет қаралды 59 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 48 МЛН
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН
Introduction to Container Queries
5:32
Coding in Public
Рет қаралды 3,8 М.
The Best Way to Declare Variables in JavaScript?
6:08
dcode
Рет қаралды 4 М.
LocalStorage was a mistake...
5:33
Josh tried coding
Рет қаралды 47 М.
NEW Way To Create Variables In JavaScript
12:13
Web Dev Simplified
Рет қаралды 274 М.
Differences Between Var, Let, and Const
8:37
Web Dev Simplified
Рет қаралды 185 М.
Callback and Higher Order Functions in JavaScript
16:41
CodAffection
Рет қаралды 4,7 М.
Every JavaScript Developer Has Made This Mistake With Functions
7:17
Web Dev Simplified
Рет қаралды 106 М.
When should you use CSS Grid?
16:17
Coding in Public
Рет қаралды 1,7 М.
TypeScript Course for Beginners - Learn TypeScript from Scratch!
3:16:40
The Art of Code - Dylan Beattie
1:00:49
NDC Conferences
Рет қаралды 4,7 МЛН
Forming of goal foam || A2Z SKLLS
1:00
A2Z SKILLS
Рет қаралды 37 МЛН
Funny Fails 🤭🤭🤣 #failsvideo #shortsfails #funnyfails  #fails .
0:52
Epic Beach Day! Digging a Massive Hole!
0:12
MELIAH & DAD (THE PONTES FAMILY)
Рет қаралды 6 МЛН
Я обещал подарить ему самокат!
1:00
Vlad Samokatchik
Рет қаралды 9 МЛН