You Don't Know JavaScript

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 338

  • @NotAFanMan88
    @NotAFanMan88 10 месяцев назад +702

    Props to that editor officially graduating and becoming a South Park animator.

    • @marcelo-ramos
      @marcelo-ramos 10 месяцев назад +57

      I thought it was some feature of his setup, which inserted him in the absence of the live camera feed. It didn't occurred to me it was added later 😅.

    • @brymstoner
      @brymstoner 10 месяцев назад +8

      @@marcelo-ramossame. either way, brilliant effort!

    • @MrMudbill
      @MrMudbill 10 месяцев назад +19

      It's basically a "PNG-tuber"

    • @MrDejvidkit
      @MrDejvidkit 10 месяцев назад +6

      Now, we know for a fact that the primagen is not Canadian 🤣🤣

    • @ΣτέργιοςΚατσογιάννης
      @ΣτέργιοςΚατσογιάννης 10 месяцев назад +12

      I bet this is not just editing. The opening of his mouth must be automated depending on the level of his voice 😂.

  • @v2ike6udik
    @v2ike6udik 10 месяцев назад +96

    "You are more empty space than space. Space is empty. You are even emptier." My new insult.

    • @ark_knight
      @ark_knight 10 месяцев назад +4

      except the smart insult may not land on a dumb person

    • @JeremyKolassa
      @JeremyKolassa 10 месяцев назад +7

      "That's a human insult. It's devastating. You're devastated right now."

    • @v2ike6udik
      @v2ike6udik 10 месяцев назад

      @@ark_knight i know. past 4 years i PHYSICALLY removed ever ppl from my life. Non of the btches saw it coming (arrogance). Nor did they belive me I WILL eventually throw commies out, no matter how close they are. Trainwashed, TshemTrailed brains, 5G androids (They are not human anymore.) But I stop whining. I actually wanted to say that *space does not exist. Space is a shadow.*

    • @TrueHolarctic
      @TrueHolarctic 10 месяцев назад +1

      ​@@ark_knightskill issue

    • @ark_knight
      @ark_knight 10 месяцев назад

      @@TrueHolarcticfeature incomplete

  • @felixjohnson3874
    @felixjohnson3874 10 месяцев назад +99

    Prime : "I don't buy the readability argument for ++ or -- vs += or -="
    Prime, seconds later : "hey chat, is a+++b post or pre increment, betcha don't know"

  • @TheVideogamemaster9
    @TheVideogamemaster9 10 месяцев назад +150

    I've spent years studying the weird parts of JS to ace any interview, there is quite literally nothing I don't know at this point.

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  10 месяцев назад +75

      that is pretty good duck hunt

    • @marcelo-ramos
      @marcelo-ramos 10 месяцев назад +8

      Could you explain why would someone use two nested with statements?

    • @ocoolwow
      @ocoolwow 10 месяцев назад +6

      ​@@marcelo-ramos I cannot explain that

    • @chpsilva
      @chpsilva 10 месяцев назад +16

      ​@@marcelo-ramos he knows, but if he tells you he'll need to get rid of you after

    • @BinxyBrown
      @BinxyBrown 10 месяцев назад +4

      ​​@@marcelo-ramos so if the first one crashes it will run again duh /badjoke

  • @tuchapoltr
    @tuchapoltr 10 месяцев назад +17

    "Bottom values" at 9:45 is a real term in discussions of programming language semantics. Although, its use in this article is weird. Meaning of terms in a language are represented as elements of an ordered set. These sets usually have a smallest element, i.e. a "bottom", because inequality is typically drawn as a slanted arrow pointing upwards in diagrams.
    The bottom value is the meaning of terms that do not evaluate to anything, i.e. an error or an infinite loop. They have "minimal" impact on the program because you can replace them with any other term, without changing the result of the program, if it originally ran successfully. But Javascript's null and undefined act more like Rust's None (without the safeties), because you can still pass them to functions and do equality tests on them. Unlike actual "bottom values", they are not interchangable with each other, so you run into problems when using one instead of the other. And if they were interchangable, there would be no need for two.

    • @barneylaurance1865
      @barneylaurance1865 10 месяцев назад +1

      Right. In Typescript and PHP the bottom type is called 'never'. As you say it's the return type functions that cannot return e.g. because they always throw or loop or exit. I'm not sure how you could have a bottom type without some static typing so it doesn't exist in Javascript.

    • @tuchapoltr
      @tuchapoltr 10 месяцев назад

      @@barneylaurance1865 That's not quite the same concept, unfortunately. Both (meanings of) terms and types can be ordered, the latter by subtyping, so T

  • @ankk98
    @ankk98 10 месяцев назад +12

    It's funny that such a big part of the world runs on two school projects equivalent languages, php and js.

  • @anj000
    @anj000 10 месяцев назад +3

    12:30 nope - you DON'T. You will always read at least the same amount as you write, but it much much more likely, almost certain, than you read more than write.
    When writing - you are reading the stuff you write. So if you read anything else besides the code you just wrote (so if you re-read the same line after you wrote it, or you read code from someone else) - you just read more than you wrote. Unless you somehow write without looking, then there is no way to write more than you read.

  • @elliotcelliot
    @elliotcelliot 10 месяцев назад +24

    As someone who has never programmed in JavaScript, I have to agree with the title

  • @emilemil1
    @emilemil1 10 месяцев назад +9

    To me x+1 has a different meaning than x++. When I write x+1 it's because the number 1 is arbitrary, it could conceivably be something else and the code would still work fine. I write x++ when It has to be incremented by 1 or the code wouldn't make sense, like iterating over a list.

    • @gavunku
      @gavunku 10 месяцев назад +2

      Well yes, x++ is the same as x = x + 1(aka reassign the value of x to its own value plus 1).
      While simply x + 1 is an expression which by default is not assigned to anything.
      For example:
      let a = 1;
      let b = a + 1;
      //which tells the browser:
      //assign to b the value of a + 1
      console.log(a)//1
      console.log(b)//2
      let x = 1;
      let y = x++;
      //which tells the browser:
      //assign to y the value of x(which still is 1 atm) and then increment the value of x by 1
      console.log(x)//2
      console.log(y)//1
      Now if the increment sign was before instead of later (let y = ++x) both x and y would log 2 since x would be reassigned before assigning its value to y but i believe the earlier example proves my point better, which is, they litterally are 2 different things, not only to you.

  • @ivanjermakov
    @ivanjermakov 10 месяцев назад +5

    9:33 semicolon is not required after variable definition statements, but before expressions starting with ( or [, since it is ambiguous whether it is a function call/index operator or expression group/array init.

  • @Kaviarasu_NS
    @Kaviarasu_NS 10 месяцев назад +2

    "You know distance Relatively beteen atoms is greater than the distance between planets. You are more empty than space. Space is empty yeah you're even emptier." @ThePrimeTimeagen ❤

  • @cassiofficial
    @cassiofficial 10 месяцев назад +5

    The extra new line at the end of the file is a Vim thing. If you write the file using code editor sublime, or maybe with printf, you can make it not appear. Vim always adds a new line at the end of files.

    • @Alex-wl1sp
      @Alex-wl1sp 9 месяцев назад

      I came to say the same thing. When doing Advent of Code, I noticed that I would get the extra newline if I copy/pasted the input into vim, but I wouldn’t if I downloaded the file directly.

  • @adaliszk
    @adaliszk 10 месяцев назад +16

    Why not get a dummy battery that you plug into the AC for the camera? It usually exist for most cameras on the market.

    • @ark_knight
      @ark_knight 10 месяцев назад +2

      He said the AC doesnt supply enough power for it to stay operational.

    • @felixjohnson3874
      @felixjohnson3874 10 месяцев назад +11

      ​@@ark_knightthats an amperage issue with the power supply it came with and not what is being suggested.

  • @pinatacolada7986
    @pinatacolada7986 10 месяцев назад +10

    You can write js without any semicolons - Except where the line starts with an open bracket. Then you simply prefix it with a semicolon. For example ()(() => {})() becomes ;()(() => {})()

    • @User948Z7Z-w7n
      @User948Z7Z-w7n Месяц назад

      Why is it so? And why do you know it??!!

  • @jacksonbourne
    @jacksonbourne 10 месяцев назад +1

    Fun fact at 15:00, most (maybe all) built-in node modules are imported by default by their package name in the repl (e.g. fs and crypto)

  • @carlpittenger
    @carlpittenger 10 месяцев назад +3

    11:52 iirc, the global isNan() isn't recommended as it attempts to coerce the argument to a number

  • @cmelgarejo
    @cmelgarejo 10 месяцев назад +8

    My takeaway from this is that, me feeling empty makes sense now.

  • @jongeduard
    @jongeduard 10 месяцев назад +2

    It's good to notice that many type coercions are also not specific to JS. After your video of yesterday, which also discussed JS lang design issues, I felt inspired to try things in VB language dialects and in Powershell.
    In both of these you can coerce a null value into a negative number by just typing a minus sign in front of it. And a string digit plus a numeric type digit concatenates them into a string, while minus or multiply actually performs numeric arithmetic. Really great. So coercions are kind of bad in general.
    Also note that PHP knew those problems as well, but it was also far earlier than JS with introducing triple length operators. So that whole solution did not originally come from JS either.

  • @3limin4t0r
    @3limin4t0r 10 месяцев назад +6

    Who's gonna tell ThePrimeagen that the global isNaN() and Number.isNaN() do not produce the same return values?

  • @funkdefied1
    @funkdefied1 10 месяцев назад +2

    16:00 it looks like JS is just straight up hallucinating a newline at the end of that file.

  • @GhiveciuMarian
    @GhiveciuMarian 10 месяцев назад +1

    Ouch.... Ouch...20:46 I REALLY DID NOT KNOW IT... Amazing what you can learn from a fun video =]

  • @dotnetapp
    @dotnetapp 10 месяцев назад +6

    i literally use
    x == null or x != null
    its the only scenario where i use "==" instead of "===" its so much shorter compared to
    x === null || x === undefined

    • @ThePrimeTimeagen
      @ThePrimeTimeagen  10 месяцев назад +2

      yes, its a nice feature... but its annoying with linters sometimes :)

  • @bocchitherock-ob2bl
    @bocchitherock-ob2bl 10 месяцев назад +2

    Title: "You don't know JavaScript"
    Me: "True and I'm glad I don't"

  • @zalatos
    @zalatos 10 месяцев назад +1

    dude, u hit me with so many more gotcha's than i've found myself and i taught this for years. also love javascript

  • @wlockuz4467
    @wlockuz4467 10 месяцев назад +7

    You forgot to talk about how a Regex with global flag maintains a hidden start index between calls and results in the most confusing behaviour.

  • @АлександрЛобов-ю6ж
    @АлександрЛобов-ю6ж 10 месяцев назад +16

    I learned JS 15+ years ago from video lessons recorded by some nerdy professor
    The first things he said were literally:
    1. JS is weakly typed so you can do crazy stuff (like adding strings to numbers)
    2. It comes with tradeoffs, because you have to know how implicit type conversion works (shows the ParseInt of 0.0000005 example)
    So in order to use the language properly and do all the crazy things it allows to do, you have to learn it deep enough. Everyone who has problems with JS has skill issues.

    • @everyhandletaken
      @everyhandletaken 10 месяцев назад +2

      That is very true. As long as you can get to the intended result & know how to get there, job done.
      A lot of people are deluded & think a perfect language exists.

  • @ericjunior105
    @ericjunior105 10 месяцев назад +34

    It's Primetime.

  • @teknoglot
    @teknoglot 10 месяцев назад +1

    There's probably a wall powered "dummy" battery available for your camera if you search for it. That way you'll not run out of power unless the grid goes.

  • @stoched
    @stoched 10 месяцев назад +2

    Bro didn't know about the mantissa
    EDIT: He did know about the mantissa

  • @TurtleKwitty
    @TurtleKwitty 10 месяцев назад +2

    the comparing string with number makes a lot of sense to exist in js BUT it is wild that the creator made it the default rather than say a ?= for a looser alternative especially if that wasnt the initial implementation/original vision for ==

  • @CoderDBF
    @CoderDBF 10 месяцев назад +2

    I didn’t know JS was this bad.
    I think the problem with JS is that it has a monopoly in its domain.
    We should be able to run precompiled code in a browser somehow.
    Like a modified version of C, with access to the DOM and the browser, capable of transmitting and receiving data to & from the server.
    Not only would it run faster, it would be more reliable and consume less memory. Less requests and smaller file size as well.

  • @31redorange08
    @31redorange08 10 месяцев назад +1

    Don't forget that people stumbling over these "issues" have skill issues.

  • @RealDevastatia
    @RealDevastatia 10 месяцев назад +2

    PHP has always had loose and strict equality operators. A long-standing PHP idiom is that many functions that return false on failure may return another "empty" value (false, null, 0, "") on success.

  • @irishbruse
    @irishbruse 10 месяцев назад +17

    Puppet prime is the best

    • @alexandrosvangelatos9979
      @alexandrosvangelatos9979 10 месяцев назад +2

      Canadian prime (south park, reference)

    • @irishbruse
      @irishbruse 10 месяцев назад

      Wonder who's hands up his a**

    • @playhard719
      @playhard719 9 месяцев назад

      The fact that I have scroll through like 10 comments to see this comment says something wrong in the world

  • @reallax7916
    @reallax7916 10 месяцев назад +20

    The moving mouth😭😭

  • @im7254
    @im7254 10 месяцев назад +1

    I like loose equality bc it makes if statements easier for empty strings or null or undefined, it's easy to always use === without forcing casting. eslint js standard linter catches all semicolon issue which is only before () or []. null is user assigned undefined which let's you tell apart missing property or set

  • @jordankittle
    @jordankittle 10 месяцев назад +2

    the .000000005 thing is going to keep me up at night

  • @yuvarajyuvi9691
    @yuvarajyuvi9691 10 месяцев назад +1

    To all those who were wondering what happened when camera went off , The Primeagen was replaced by The Limeagen

  • @grimfate
    @grimfate 10 месяцев назад +1

    I've fallen into semicolon issue 3 or 4 times for the same reason: Placing a self-invoking function after a line that doesn't end with a semicolon. Always takes a moment to figure out what has happened.

  • @w_3ird0h
    @w_3ird0h 10 месяцев назад +1

    5:17 I died laughing for a few minutes on this one literally rofling over here

  • @tivrusky3483
    @tivrusky3483 10 месяцев назад +1

    class Person {}
    > undefined
    console.log(typeof Person);
    > function

  • @tapu_
    @tapu_ 10 месяцев назад +3

    Everyone else: 8==D
    Javascript: 8===D
    Above average 💪

  • @michaelpumo83
    @michaelpumo83 10 месяцев назад +10

    parseInt() needs a radix; parseInt(1, 10).
    Regarding '' values in your array from the file, you could use Array.filter() on those empty values first and THEN use Array.map()

    • @CottidaeSEA
      @CottidaeSEA 10 месяцев назад +2

      Using trim on the initial string also helps against the final newline. Still screwed if there are newlines in the middle, in which case your solution will work nicely.

    • @huge_letters
      @huge_letters 10 месяцев назад +2

      You could just inline your map callback as (el)=>parseInt(el)
      The error is caused by the fact that map also provides index(and array) as parameters which get fed into parseInt and result in NaN - cause you ask it to interpret 3 as a number in base 3 which isn't possible.

  • @awesomedavid2012
    @awesomedavid2012 10 месяцев назад +18

    It's kind of crazy to me that there could be developers that don't know IEEE 754 at least in concept. I thought that was just something you learned in your first two months. But I guess things are different in Javascript land

    • @Duncanbullet
      @Duncanbullet 10 месяцев назад +12

      I knew about it but not until I actually came across it in a real world problem. I don't have a CS degree and have no formal software training outside of building things and learning while building. In my experience, when the organization asked me to build an internal web app in JS/React, I started with small tutorials and worked my way up, and unfortunately no where in those tutorials did IEEE 754 come up.

    • @xBiggs
      @xBiggs 10 месяцев назад +6

      I remember first learning about this in college. Maybe devs who don't go to school never encounter it

    • @digie3823
      @digie3823 10 месяцев назад +1

      @@xBiggs it is indeed devs who don't have related cs degree. I mean, if some cs grads don't even know it, then it's more likely someone without cs degree don't know it.

  • @StiggyAzalea
    @StiggyAzalea 10 месяцев назад +2

    Given im not a programmer, your title is accurate

  • @Daniel_WR_Hart
    @Daniel_WR_Hart 5 месяцев назад

    16:18 It would work a lot better to do .map((v) => parseInt(v))
    because parseInt can take 2 arguments (value, radix), and .map passes I think 3 arguments (value, index, array), so it's parsing digits that are impossible for the radix/base being specified for that example, which results in NaN
    i.e. parseInt('3', 3) returns NaN because there is no 3 in a base 3 number system

  • @inzanozulu
    @inzanozulu 10 месяцев назад +27

    My friend gifted me the book "You Don't Know JS (yet)", which I believe this article is related to, and man, what a waste of dead trees. There's good JS books out there but this one feels like it was written by somebody with a month or two of experience and all the confidence of a 10 year senior dev

    • @svenzverg7321
      @svenzverg7321 10 месяцев назад +5

      This article is not related to YDKJSY in any way. If anything, it's quite obvious that the author of the article has never read it. Regardless, what exactly is wrong with the book? Kyle has way more than 10 years of experience, so this critique doesn't sound particularly valid. And his book is on GH, so if there's inaccurate information, you can easily point it out.
      Edit: I want to make clear, that I didn't read YDKJSY in its entirety, so my question is genuine, not a usual shitposting.

    • @inzanozulu
      @inzanozulu 10 месяцев назад

      ​@@svenzverg7321 Hey thanks for the clarification. I just jumped to conclusions based on the tone of the article. My problems with the book was where it was going over the boring criticisms of js with all the type coercion which is just the boring repeated stuff you hear about. Also calling JS "weakly typed" - which I believe is one of those academic "technically wrong" since all the type coercions are precisely defined.
      Briefly skimming through it on GH I see how it talks about how there are legitimate uses of `var`, which I find debatable.
      Now that I'm looking through the book again, I think I was so put off by that stuff in the early chapters that I just tuned it out and didn't bother to read the rest. I don't plan to, but maybe there's OK stuff out there

    • @svenzverg7321
      @svenzverg7321 10 месяцев назад

      @@inzanozulu I see.

  • @MDMAviation
    @MDMAviation 10 месяцев назад

    b + +a works too.
    b++ returns it's value and then adds 1, different than ++b that adds 1 before returning it's value. b is already an integer, so it doesn't matter if you poth both + after it or not.

  • @lorenzrosenthal119
    @lorenzrosenthal119 5 месяцев назад

    his jaw being animated automatically while the picture is still is the most uncanny thing I came across in a while

  • @darkdudironaji
    @darkdudironaji 10 месяцев назад +2

    "Regular bottoms and power bottoms?" Ha! Got eeeem

  • @soniablanche5672
    @soniablanche5672 10 месяцев назад +2

    String.prototype.concat is slower than +

  • @aBradApple
    @aBradApple 10 месяцев назад

    I was looking for a pro's insight before starting to learn this stuff. This reminds me of all the rule exceptions that need to be memorized in Chemistry.

  • @GrandpaRanOverRudolf
    @GrandpaRanOverRudolf 10 месяцев назад

    i've been using javascript without semicolons for like 6 years. It's not required anywhere.
    there is one case in which you would have to use them though, because the inference can't figure it out
    functionCall();
    [1, 2, 3, 4].forEach(doSomething)
    in this case ()[] makes it think that you're trying to access an index in an array if there's no ; separating them as statements
    there also may have been another case similar to this but I can't remember it right now
    edit: oh yeah it's the thing in the video, if you're wrapping random whole statements in () for some reason (but why would you be?), then it thinks you're trying to use a function of the previous line
    I don't know why his claim is "you run into this a lot". I've only ran into this maybe a dozen times, generally because I'm defining one-use arrays after a function call, which is kind of hacky it's better to have named variables. Why would you start new lines with () even? That sounds even worse!

  • @trisibo
    @trisibo 10 месяцев назад +3

    I just wanted to watch some videos to relax after almost crying while making a small JS plugin for a Unity project, but now I'm having seizures, thanks

  • @foqsi_
    @foqsi_ 10 месяцев назад +1

    Man. Him randomly blurting out the chat's comments is hilarious. Just "Yo momma" outta nowhere. lmfaoo

  • @tofonofo4606
    @tofonofo4606 10 месяцев назад +1

    FLIP IS THE MAN! OMG IM ROLLING. WELL DONE SIR!

  • @paxdriver
    @paxdriver 10 месяцев назад

    This is one of my favourite videos. More javascript weirdness please, I love these

  • @Nyxar-2077
    @Nyxar-2077 10 месяцев назад +1

    16:22 nooooooo

  • @ciCCapROSTi
    @ciCCapROSTi 3 месяца назад

    2:50 that's just C syntax. Unary postfix increment, binary addition, unary sign. That's not JS's fault, it's not even a fault.

  • @BluePhoenixAlex
    @BluePhoenixAlex 5 месяцев назад

    Shoutout to the chatter who said "Vtuber" when talking abojt types of bottoms at 10:08
    Not sure if that's what they meant or if they were talking about the southpark puppet avatar prime has going on, but it fits lol

  • @chrisalexthomas
    @chrisalexthomas 10 месяцев назад

    Canadian Primeagen is the best primeagen, I'll fight you on this!

  • @olamilekanadeleke6806
    @olamilekanadeleke6806 10 месяцев назад +2

    Prime 0
    Camera 1,000
    W Camera 🔥

  • @thatsenoughdixit
    @thatsenoughdixit 10 месяцев назад

    I didn't realise how deadly eggshells I was walking on.

  • @vitalyl1327
    @vitalyl1327 10 месяцев назад +68

    There's a worryingly massive overlap between people who code in javascript and people who have no idea how binary floating point works. Almost as if web development attracts the most unscrupulous types.

    • @fuzzy-02
      @fuzzy-02 10 месяцев назад +8

      Maybe because they tell most students and such its the easiest to get into and start making money?
      Im not sure tho

    • @arcuscerebellumus8797
      @arcuscerebellumus8797 10 месяцев назад +24

      There shouldn't be a need for that if you take software trends to heart.
      The overwhelming majority of developers don't know machine codes of systems they operate on, which wasn't the case 60 years ago... I wouldn't mind if every adept of every particular discipline was super-competent in adjacent matters, but at some point, human life span limitations start kicking in and you have to sacrifice (abstract away) fundamentals in return for expediency and/or getting anything done at all.

    • @marcelo-ramos
      @marcelo-ramos 10 месяцев назад +4

      Not just JavaScript. More often than not, pogrammers in general just don't know it.

    • @programaths
      @programaths 10 месяцев назад +4

      When you do CS, you learn to manipulate floats in various radixes with pen and paper. Then, you tend to do the hard stuff.
      The others who are 100% self-taught fall mainly in the light backend apps and frontend.
      There is a vast difference between a BootCamp and a bachelor's degree in computing. 😂
      Ask those same people when writing a simple FSA over using a RegExp is preferable. I'm not sure they even understand the question.
      And that's a question one should be able to answer after the introductory courses. (few first months)

    • @fuzzy-02
      @fuzzy-02 10 месяцев назад +4

      @@programaths indeed, in university ee get taught a 100, unrelated to the job, subjcts but are fundamental to know.
      Just the simplest thing like you mentioned, doing conversations on pen and paper for example.
      (But oh god do I not want to to redo writing assembly on pen and paper x.x)

  • @danielcoats713
    @danielcoats713 10 месяцев назад

    Sometimes I love messing with JavaScript and making some crazy syntactical soup, and every time I come back to JavaScript to mess with something, I always run into something weird when parsing data that takes up most of my time.

  • @zeocamo
    @zeocamo 10 месяцев назад

    the ++ thing is because most devs don't know what i++ do and what ++i do, and it is easy to make bugs if you don't understand the code.
    and the ++ was for the days where we(i am so old sigh) didn't have strings in C, and we used char arrays, we use chars[i++] = 'a';chars[i++] = 'b'; to make a string and here it was gold, as chars[i] = 'a'; i +=1; chars[i] = 'b'; was not great.
    and to 95% of devs out there the placement of the ++ is when it return the value, so ++i add 1 and return and i++ return and then add 1.

  • @mintx1720
    @mintx1720 10 месяцев назад +1

    at least knowing if a number is odd is easy

  • @Xomps
    @Xomps 10 месяцев назад +2

    21:39 return statements require semicolon so it gets auto inserted at the end of the line. You read that 13 minutes earlier.

  • @TurboBorsuk
    @TurboBorsuk 10 месяцев назад +1

    You're definitely reading more code than writing mate - at bare minimum you read what you've written and then some :)

  • @blipojones2114
    @blipojones2114 10 месяцев назад +1

    thought this was gona be piece on how the writer of "You don't know JS" is unemployed for serveral months now......i guess it takes one to know one (ba-dum-ptis)

  • @EonSlemp
    @EonSlemp 10 месяцев назад

    6:12 - sweet baby jesus can someone explain to me why when he highlights a sentence or block of text he does not include the first and last character?

  • @MrDejvidkit
    @MrDejvidkit 10 месяцев назад +1

    Now we know for a fact that theprimagen is not Canadian!

  • @3ckortreat
    @3ckortreat 10 месяцев назад

    This channels video editor should be the next president

  • @Whatthetrash
    @Whatthetrash 10 месяцев назад +2

    I really hope the editor found a way to automate the mouth flaps here and didn't do all this manually. Good grief! >_< (Either way -- awesome video! Props!)

  • @johansenjuwp
    @johansenjuwp 10 месяцев назад

    i do like fixed point or intgerized calculations for performance

  • @fuzzy-02
    @fuzzy-02 10 месяцев назад

    My brain fell into confusion and almost a daze when prime disappeared

  • @strmchsr1537
    @strmchsr1537 10 месяцев назад

    I had to check my settings to see whether playspeed wasn't increased for some reason. It wasn't.

  • @RjRafael21
    @RjRafael21 10 месяцев назад

    ThePrime mouth moving after the camera died, so freaking hilarious

  • @conceptrat
    @conceptrat 10 месяцев назад

    Haha. Didn't realise that you'd switched to Thunderbird mode when your camera choked at @4:05 Could this be a new phase of “...a gen“?

  • @mrmagnetic927
    @mrmagnetic927 10 месяцев назад

    IDontHaveACamera-agen is my favorite

  • @RealRatchet
    @RealRatchet 10 месяцев назад

    Honestly because I switch between languages with and without unary inc/dec I just stoped using unary in languages that support it because I'm less likely to put it in one that doesn't.

  • @doesitmatter
    @doesitmatter 10 месяцев назад

    16:24 javascript is difficult.. for real?
    .toString().split("
    ").filter(Boolean).map(Number)

  • @AK-vx4dy
    @AK-vx4dy 10 месяцев назад +1

    Instead of just ranting we should be amazed that some one was able standarize this quirks and all implementations of JavaScript engines behave the same way....
    JavaScript is probably only language wich has this, C/C++ are not (or maybe were, maybe it is better now) so consistent even they also have a standarts.

  • @BiHMaverick
    @BiHMaverick 10 месяцев назад

    Thank you Prime, and thank you Flip for this masterpiece.

  • @Amy-601
    @Amy-601 10 месяцев назад

    I used JS with JSON with Ajax ( overkill , WTH 🤦‍♀️, no clue what I was doing) for a restful web service, for async data . And then I used JEST ( also written in JS) to test it! Lol 😂 question 🙋‍♀️: do we have a trim() 16:21 ?? - Amy

  • @br3nto
    @br3nto 10 месяцев назад

    10:39 I love bottom values. You know what’s better than one bottom??

  • @LpMitKm
    @LpMitKm 9 месяцев назад

    @ThePrimeTime
    15:00 I tried the same thing you did, but I got the correct amount of items in the array. Not 1 more as you did.
    Tested it on a windows 10 (Version 22hH) based machine with node v20.0.0

    • @elgalas
      @elgalas 9 месяцев назад +1

      That's because it is a Vim thing. It adds a new line to the end of the file. He spits to the floor when he says JS but makes that mistake.
      You did well to test this yourself. Always take tech-influencers with a pinch of salt.

    • @LpMitKm
      @LpMitKm 9 месяцев назад

      Ah makes sense, thanks for clarifying it.
      But also weird that it happens.
      I like to fact check when I'm taking in advice from expirienced people, since they can always tell me some bs without me knowing due to my inexpirience.@@elgalas

  • @airkami
    @airkami 6 месяцев назад

    If you are using ++ or -- then, that should let you know that the thing being modified is literally mean to be a number that doesn't go up or down more than a single value at a time.
    If you put ```number += 1``` then, that tells me 1 can be changed and really should likely be a constant more like ```number += STEP_SIZE``` but none of that is in the back of the mind as possible paths that can be taken when starting with ```number++```

  • @Metruzanca
    @Metruzanca 10 месяцев назад

    I like how Prime became MattPat 5 minutes into the video.

  • @popcorn245
    @popcorn245 10 месяцев назад +2

    All hail Canadian Prime!

  • @billy818
    @billy818 10 месяцев назад +2

    lets goo, staying up till 1am is worth

    • @nousquest
      @nousquest 10 месяцев назад

      Just watch the next morning

  • @memoryleakerz
    @memoryleakerz 10 месяцев назад

    I-don't-have-a-camera-Agen has done it again...

  • @adam.alexandru
    @adam.alexandru 10 месяцев назад

    :))) what camera are you using? there are some "fake" batteries that makes your camera think it is a battery, but it is actually a power adapter

  • @hakaitech
    @hakaitech 10 месяцев назад

    HAVE YOU TRIED HELIX EDITOR?

  • @weeb3277
    @weeb3277 10 месяцев назад +2

    a lot of people like to point to goofy ways js deals with undefined behavior but it's because they are too dumb to do the same with C++ or other languages.

  • @ersetzbar.
    @ersetzbar. 10 месяцев назад

    I pefer to use `${var}text` to include variables in strings, especially when using style tags in vue

  • @pepkin88
    @pepkin88 10 месяцев назад

    Typed arrays get sorted numerically, because they are guaranteed to be all numbers.

  • @berkeerbagci
    @berkeerbagci 2 месяца назад

    Shout out to editor! Bravo..

  • @JuusoAlasuutari
    @JuusoAlasuutari 10 месяцев назад

    JS needs a prime equality operator where the number of consecutive '=' characters can be any prime number. A longer operator is always stricter than a shorter one, and there are infinitely many. Excluding sequences of composite length prevents ambiguity, e.g. "======" (6 equals signs) is forbidden, as it might be either two triple equalities or three double equalities concatenated.
    This solves two major problems: loose typing, and not typing enough equals signs. Think about it. It makes perfect sense. JS already has equality operators for the first two prime numbers, obviously adding more is the endgame.

  • @br3nto
    @br3nto 10 месяцев назад

    9:03 I always do the opposite. I remove all semicolons unless they are explicitly required. Semicolons are unnecessary bloat.

    • @br3nto
      @br3nto 10 месяцев назад

      9:36 They aren’t required after let statements. But required because of the weirdness on the next line.