Video není dostupné.
Omlouváme se.

15 Mistakes Beginner JavaScript Developer Make - Are You One of Them?!

Sdílet
Vložit
  • čas přidán 18. 08. 2024

Komentáře • 70

  • @JamesQQuick
    @JamesQQuick  Před 2 lety +1

    Check out the full Source Code 👉 join.replit.com/jamesqquick

  • @alexandernordstrom1617
    @alexandernordstrom1617 Před 2 lety +9

    For the first one, removing the curly braces will also fix the error by relying on the implicit return mechanism of concise body arrow functions. This is specific to arrow functions, and can only be used if the function can be written as a single expression. If you need a block body, you do need an explicit return statement. Just thought it's worth mentioning because people might come across code that looks almost like the example but which actually works.

    • @JamesQQuick
      @JamesQQuick  Před 2 lety +1

      Yep arrow functions syntax would definitely simplify that

  • @azizgofurov1575
    @azizgofurov1575 Před 2 lety +9

    Just a small note, you can keep script in the head of the document, but you should add defer attribute to it and it would solve the issue)

    • @JamesQQuick
      @JamesQQuick  Před 2 lety +4

      Yep. Agreed. Figured that wasn’t as beginner friendly but I did refer to that in the blog post. Great suggestion!

    • @Hollowendz
      @Hollowendz Před 2 lety +4

      He def mentioned this in the video lol

  • @litus01
    @litus01 Před 2 lety +5

    I have been working in the industry for a couple of years now. Most of what you mentioned would have been very helpful to know back when I started. I admit there are a couple of those that I still struggle to remember to do, i.e. handling errors and knowing if a method or extension is a mutator or asynchronous. Thanks for the reminders and for making me aware of how much I have grown as a developer. Things like this help me to prepare for being a better mentor as well. I think it is easy for us to forget what the exact struggles we went through on our journey. Your videos are always helpful in either teaching something new, reminding me to do things the right way, or keeping me aware of the things I should help pass down to the next new developer.
    Thank you, James!!!

  • @xmehdi_01
    @xmehdi_01 Před 2 lety +2

    Thanks for the useful video, Just a quick note in 9:50 condition of for loop i must be less than names.length not arr.length also in second line access to it by names[i] not arr[i]

  • @virginieallflatt1709
    @virginieallflatt1709 Před rokem

    Thanks, it was great to see I'm not alone making these beginner's mistakes! Great way of explaining!

  • @avertry9529
    @avertry9529 Před 2 lety

    Thank you, as I watch many people, I've learned shorter ways, but not always the best or most descriptive, here are a few.
    - defer your js file like so. in the Head.
    - isOdd can be shorter like so, const isOdd = num => (num % 2 === 1)
    - err && console.error(err)

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      All very true!

    • @repenning1
      @repenning1 Před rokem

      or, if this should be even shorter "const isOdd = num => num % 2" I would not call this great but it works because 0 == false and 1 == true are both true

  • @alanhf
    @alanhf Před 2 lety +5

    First of all, I would like to wish you good luck on this "new path" working full time here.
    I hope you enjoy it and that you have way more return than effort making these awesome videos.
    Also I'm quite happy to realise that I usually don't make most of these mistakes and as a beginner
    it's hell of incentive. Thanks James, for real!!!

  • @repenning1
    @repenning1 Před 2 lety +1

    Note: arrow functions DO return values (implicitly). This would have worked "const getAddedValue = (a, b) => a + b" without using return.

  • @johnnydriesen7575
    @johnnydriesen7575 Před 2 lety +1

    Excellent video !
    Thanks for sharing, James.
    Using most of these "pitfalls" during a first interview ..
    Just as an info ...
    JS Juniors sometimes also are getting "blocked" when seeing a try... catch... finally structure...
    Might need some explanation as well.

    • @JamesQQuick
      @JamesQQuick  Před 2 lety +1

      Great point! Thanks for sharing that.

  • @karlstenator
    @karlstenator Před 2 lety +1

    The biggest mistake that I personally make is not coding every, single, day. Gotta be in it to win it, thanks @James Q Quick! 💪🏻

  • @indriq78
    @indriq78 Před rokem +1

    I would put into beginner mistakes as well when someone creating a variable with an anonymous function as a value instead of using function keyword. :)
    joking apart, could you please explain why do you prefer anonym functions as variables than named functions? the former is a function acting as data. why using a function as a data when there is a way to create a function just to be a function? ...and functions with names are better for debugging. functions as data should be used for example to work with higher-order functions.

    • @JamesQQuick
      @JamesQQuick  Před rokem

      Honestly, it's just a preference for me syntactically. I wouldn't say I have a great logical reason lol

  • @nedaification
    @nedaification Před rokem

    both these guys are in the same room!!!

  • @emililie2244
    @emililie2244 Před rokem

    Thank you. Interesting. In the hasEvenNumber function, the retVal variable remained, which is not used

  • @doniaelfouly4142
    @doniaelfouly4142 Před měsícem

    Thanks

  • @lucasrmendonca
    @lucasrmendonca Před 2 lety

    Always happy to see cap guy making his cameo!

  • @keeprunning5457
    @keeprunning5457 Před rokem

    youre the man mil gracias !!

  • @saurabhrajput1188
    @saurabhrajput1188 Před rokem

    Thanks for the video

  • @TheMontbra
    @TheMontbra Před 2 lety +2

    20:00 and 23:15, Objects in JS, unlike primitive types, are passed by reference, then you are, essentially, messing with the same object. Be careful here.

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      I’m not sure where exactly you’re going here? I specifically talk about objects being passed by reference and show an example of how they’re equal if you assign one variable to another variable that is an ovjsct

    • @TheMontbra
      @TheMontbra Před 2 lety

      @@JamesQQuick only reinforce this concept after read some comments. BTW I really like your style. Subscribed for along time.

  • @MrArod1234
    @MrArod1234 Před 2 lety +1

    I’ve been told it’s better practice to store the JS file in the head with all other meta data and just defer it. What are your thoughts?

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

      He said in other comment that is correct, but avoided to mention it in the video for considering it a little not "beginner-friendly". Anyway, you're right, the defer attribute would do the trick.

  • @codewithguillaume
    @codewithguillaume Před rokem

    Hahaha I like that you talk to yourself :)

  • @chukwuemekaorji9331
    @chukwuemekaorji9331 Před 2 lety

    Amazing @James Q Quick It was awesome I did learn a lot thank you so much Amazing chanell

  • @constantine9074
    @constantine9074 Před rokem

    10:25 i have "problem" with event listeners.. sometimes 30 lines ans more :(

  • @bm9code
    @bm9code Před rokem

    08:22 Could anyone explain what is James explaining about, I'm unable to understand

  • @satar9
    @satar9 Před rokem

    In this example you gave concerning the object vs primitives comparison, is this situation only specific to objects, or does it include other non-primitive data types?

  • @urekmazino6047
    @urekmazino6047 Před 2 lety

    thanks

  • @sam.shock924
    @sam.shock924 Před 2 lety +1

    would you ever make a video like this about React? I'm going through it currently and trying to avoid the crap I did with vanilla 😅

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      That's a great question. I'll think through that :) Any mistakes you would add to the beginner React mistakes list?

  • @tedfitzpatrickyt
    @tedfitzpatrickyt Před 2 lety +1

    Hi James, in VS Code what’s the fastest way to type “const” … is there a shortcut? Like, a way to generate it faster than typing 5 chars.

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      Hmm, you could create a snippet in VS Code? I feel like that would be tough though because what would the trigger for that snippet be? It's hard to get a trigger much shorter than const I would think.

    • @tedfitzpatrickyt
      @tedfitzpatrickyt Před 2 lety

      I just created a global "user snippets" file so typing co then enter generates const, typing le then enter generates let (just for mental consistency). I'll see how it goes haha

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      @@tedfitzpatrickyt Yeah I just wondered about that beign super generic, but i think you got it!

  • @MarkDeibert
    @MarkDeibert Před 2 lety +1

    Replit looks pretty cool. However, that white theme is burning a hole in my retina :-D Option for dark?

    • @MarkDeibert
      @MarkDeibert Před 2 lety

      Ok I found it. There is a dark mode. Whew ;-)

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      That was a close call haha

  • @TheMikael666
    @TheMikael666 Před 2 lety

    i will make my recommendation before watching the whole video, when you guys are programming in JS, use a well configured linter, like ES lint for example, it can show bad javascript in red (like errors) it will compile anyways, but you will have the chance to correct them before compiling.

  • @CrazyAshu34
    @CrazyAshu34 Před rokem

    Video Se Excellent But can you add some syllable Stress On your English speaking 🐏 it'll Really Help

  • @spirko97
    @spirko97 Před 2 lety

    In "Cannot Read Property of Undefined", how about using optional chaining:
    function printName(person) {
    let name = person?.name;
    console.log(name?name:'Unknown person');
    }

    • @spirko97
      @spirko97 Před 2 lety

      Nevermind, you mentioned it right after the first method.

    • @JamesQQuick
      @JamesQQuick  Před 2 lety

      bahaha love these two comments!

  • @HoNow222
    @HoNow222 Před 2 lety

    Still great to see this stuff

  • @coolmind2476
    @coolmind2476 Před 4 měsíci

    Javascript is a weird programming language, one has to know certain strange behavior to achieve the desired result. But despite its bad design and syntax its still number 1 web application programming language.

  • @zeusamorim9531
    @zeusamorim9531 Před rokem

    awesome

  • @Pathfindersdomain
    @Pathfindersdomain Před 2 lety

    Line 80 @ 10:00, you have changed arr to names, but not in the ***Better*** code.

  • @kamertonaudiophileplayer847

    Because my functions usually return nothing. I also didn't know that 'some text' % 2 may return something not int. I knew so many good things, so I can ask for a raise now.

  • @repenning1
    @repenning1 Před 2 lety

    7. unnecessary return. Even shorter (use implicit return, skip optional paren) "const isOdd = num => num % 2 === 1"

  • @prashpatil24
    @prashpatil24 Před 2 lety

    Yes i face same in beginning 💪👍

  • @yunas7888
    @yunas7888 Před 2 lety

    HTML and CSS Layout -
    czcams.com/video/4l7jUOc-2QQ/video.html

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

    Why use anything other than VS Code these days? May not be the best or perfect, but does run on windows, mac, unix and supports nearly any language one might care for...

  • @AlThePal78
    @AlThePal78 Před rokem

    Too bright lol