Checking for the Existence of JavaScript Variables

Sdílet
Vložit
  • čas přidán 15. 07. 2023
  • When writing JavaScript there are going to be times when you want to use a variable or call a function, but you are not sure if it exists, then this is how you can handle these situations.
    Code from video: gist.github.com/prof3ssorSt3v...

Komentáře • 33

  • @SaadEdify
    @SaadEdify Před 4 měsíci +3

    Hello Professor
    Thanks for teaching us
    hope you are doing fine
    waiting for more tutorials and lessons.

  • @shahinza
    @shahinza Před 8 měsíci +1

    Hello Professor! I've truly missed your insightful videos. Your content has always been my go-to for simplifying complex topics. Hoping everything is going well for you. Looking forward to new uploads!

  • @cholo2605
    @cholo2605 Před 4 měsíci +1

    We miss you prof3!!

  • @chiggywiggy524
    @chiggywiggy524 Před 3 měsíci

    You're the Bob Ross of programming ❤

  • @anthonydsouza8202
    @anthonydsouza8202 Před 7 měsíci

    Hi professor. Great to know that you are writing a book. Surely, it's gonna be as awesome as your videos. Wishing you all the best.

  • @NurioonSoftware
    @NurioonSoftware Před 8 měsíci

    Professor. Your channel is Diamond 💎

  • @Felipekimst
    @Felipekimst Před rokem +3

    Man, that wind out there got me scared lol

  • @nro337
    @nro337 Před rokem

    Great video!

  • @shahinza
    @shahinza Před rokem

    Thank you 🙏

  • @St1diot
    @St1diot Před 3 měsíci +1

    I love you proffesor steve ❤❤

  • @Strasbourgeois
    @Strasbourgeois Před 10 měsíci

    A script of type module creates it's own scope preventing var declarations from bubbling up to the global scope

  • @leonardchan2638
    @leonardchan2638 Před 9 měsíci +1

    There's an edge case where, you just declare a variable (but don't assign a value to it) let varname; and typeof varname is actually 'undefined'. So you can't re-declare it. Not practically useful though...

  • @rationalindianguy
    @rationalindianguy Před 3 měsíci

    Hello sir.
    You are doing amazing... please upload React

  • @user-tt7po9td3x
    @user-tt7po9td3x Před 9 měsíci +1

    Hi Steve, great content. I was wondering if you could make a video on Promise polyfill using es6 classes. It's commonly asked in interviews

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 9 měsíci +2

      I have not heard of that being asked in many years. Node and all browsers all support Promises and have for years.

  • @grenzhochspannungshindernis
    @grenzhochspannungshindernis Před 11 měsíci

    Can you recommend any how-to-program books?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 11 měsíci +1

      There are thousands.
      It depends on what specifically you are trying to learn. What language? What framework? What technology?
      I recommend going to a book store and spend a couple hours flipping through books on the topic you want to learn. Pick a book whose author writes in a way that you understand. It doesn't matter what book or what you are learning. As long as you are learning, you are making progress. Programming is a life-long learning process. Just start.

  • @mayankshashi5557
    @mayankshashi5557 Před 11 měsíci

    Hi sir, can you please make a video on how we can display image on webpage when we upload image data into indexdb in offline mode?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 10 měsíci

      This video explains how to work with files and data to display things on a webpage - czcams.com/video/zq2xD-xuIG4/video.html
      I do plan to make a video on how to save files with IndexedDB... not sure when but it is on my list.

  • @user-he1rz2bv9w
    @user-he1rz2bv9w Před 2 měsíci

    Hey steve, I'm 15 year old and I only just started learning programming, I want to make it a career out of it, is starting at 15 ideal and how many years will it take me on average to achieve an intermediate or advanced level??

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 2 měsíci +1

      In my program, I've taught 17 year olds and 60 year olds. Both of whom did great. The best time to start learning how to program is today.
      The time required to get to an intermediate level depends on the person and how much time is spent learning and practicing through building things. Could be a year, or could be five years. You also have to consider intermediate in which area. There are lots of areas to learn about in programming. You can be a beginner in a dozen and intermediate in a couple, and advanced in a couple others.

  • @atjustlookin
    @atjustlookin Před 8 měsíci

    The way you built out this object in this video czcams.com/video/D9JHizCAx8U/video.html, i am curious if one of your vids touch on the foundations on how to do this. I am having issues grasping how to fullt use objects like this or have than added or adding to a array and be able to manipulate them off of user input and doms. I am doing the form validation for Odin project and it brought me to your channel

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 8 měsíci +1

      In this video czcams.com/video/NxVCq4p0Kb0/video.html I talk about building simple JS objects with the data from a form. In this video czcams.com/video/GWJhE7Licjs/video.html I talk about simple work with FormData objects.
      I have lots of videos talking about basic work with JS Objects. There are lots and lots of things to learn about Objects. Maybe I will make a long 60+ minute video about all that object info combined into one place.

  • @RalphGoddard-tt1xq
    @RalphGoddard-tt1xq Před rokem

    If your not already, you might want to use a noise cancelling mike

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před rokem +1

      I do but there was a Tornado approaching while I was recording. Seriously.

    • @bmehder
      @bmehder Před rokem

      @@SteveGriffith-Prof3ssorSt3v3 I was going to ask if you were recording the video during a tornado as a joke. Glad you made it through unharmed.