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 :)
@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.
@rawrsophiex
@rawrsophiex 2 жыл бұрын
thanks for the tutorial. you sound like michael scott lol :)
@CodinginPublic
@CodinginPublic 2 жыл бұрын
Haha I’ve gotten that before ha
@meggines
@meggines 3 жыл бұрын
i just subscribed :0
@CodinginPublic
@CodinginPublic 3 жыл бұрын
Thanks!!
Learn JavaScript Scoping In 10 Minutes
11:39
Web Dev Simplified
Рет қаралды 59 М.
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 33 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 12 МЛН
The Best Way to Declare Variables in JavaScript?
6:08
dcode
Рет қаралды 4 М.
LocalStorage was a mistake...
5:33
Josh tried coding
Рет қаралды 47 М.
Differences Between Var, Let, and Const
8:37
Web Dev Simplified
Рет қаралды 185 М.
Stop Using else Statements in Javascript
7:04
Sam Meech-Ward
Рет қаралды 4,3 М.
Every JavaScript Developer Has Made This Mistake With Functions
7:17
Web Dev Simplified
Рет қаралды 106 М.
Astro Actions (First Look!)
13:15
Coding in Public
Рет қаралды 6 М.
NEW Way To Create Variables In JavaScript
12:13
Web Dev Simplified
Рет қаралды 274 М.
Data Analysis with Python for Excel Users - Full Course
3:57:46
freeCodeCamp.org
Рет қаралды 2,2 МЛН
When should you use CSS Grid?
16:17
Coding in Public
Рет қаралды 1,7 М.
Callback and Higher Order Functions in JavaScript
16:41
CodAffection
Рет қаралды 4,7 М.
Cute 💕🍭🍉🍒🤣
0:10
Koray Zeynep
Рет қаралды 23 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
0:28
路飞与唐舞桐
Рет қаралды 37 МЛН
ПАЛОЧКИ + БУТЫЛКА = ВАЗА😳🥢
0:52
polya_tut
Рет қаралды 3,4 МЛН
Мужик купил китайское авто и сразу поехал в СЕРВИС
0:14
Собиратель новостей
Рет қаралды 4,7 МЛН
Jason made a fun pool in the Truck
0:21
Jason Vlogs
Рет қаралды 14 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
1:00
Justin Flom
Рет қаралды 27 МЛН