Data Types - Beau teaches JavaScript

Поділитися
Вставка
  • Опубліковано 4 січ 2025

КОМЕНТАРІ • 48

  • @Galejandro84
    @Galejandro84 7 років тому +10

    great tutorial
    but i think it is a lot much easier to understand Object type:
    var myCar = {
    make = "Ford",
    model = "Mustang"
    };

  • @jj006jayj6
    @jj006jayj6 6 років тому +19

    When do we use Symbol..exactly..? Excuse me could you write a brief example, please??

  • @johnandersmith9990
    @johnandersmith9990 4 роки тому +1

    Hey thanks for this I've been studying javascript till I got up to this thanks for clarifying these.

  • @BitterMonday
    @BitterMonday 4 роки тому +2

    Need more explanation on symbol and objects

  • @sarfaraz111
    @sarfaraz111 7 років тому

    var name1 = Symbol("Description 1");
    var name2 = Symbol("Description 2");
    name1 = "John"
    name1 = "Smith"
    console.log(name1);
    If the value are unique than why John is overwriting Smith What is the use of Symbol in this code?

  • @user-fk8zw5js2p
    @user-fk8zw5js2p 6 років тому +3

    What's the point of:
    var myNumber = null;
    when:
    var myNumber = 0;
    takes fewer keystrokes?

    • @oufcena5092
      @oufcena5092 5 років тому +1

      null data type means a variable is neither declared nor assigned (initialized).
      Meanwhile, because of JS type conversion null is evaluated to 0

    • @ToriKo_
      @ToriKo_ 4 роки тому +1

      @ouf cena thanks for answering!

  • @briancox6926
    @briancox6926 7 років тому +1

    Do these videos follow along with the original JS track or the new beta JS track better?

    • @BeauCarnes
      @BeauCarnes 7 років тому +4

      Beta. Check this article if you haven't seen it: medium.freecodecamp.com/my-giant-javascript-basics-course-is-now-live-on-youtube-and-its-100-free-9020a21bbc27

  • @stepbystepscience
    @stepbystepscience 7 років тому

    In the first example you did have to say....if(data === true) {..... I guess it just assumes true first???

  • @libertysomething
    @libertysomething 7 років тому

    Great Tutorials! i like them

  • @morriswarachi
    @morriswarachi 7 років тому

    Great tutorial!

  • @astronaftis3
    @astronaftis3 6 років тому +1

    Q: At 6mins, are .make and .model the properties of the Object?
    Thank you for your videos!

    • @oufcena5092
      @oufcena5092 5 років тому

      Precisely!

    • @rakinrahman890
      @rakinrahman890 4 роки тому

      Hmm I don't think so, maybe those are variable name of Ford and Mustang?

  • @9shopir
    @9shopir 7 років тому

    Hi, nice video, I wonder what text editor are you using?

    • @Galejandro84
      @Galejandro84 7 років тому

      i guess he is using codepen.io

    • @jatinc6058
      @jatinc6058 7 років тому

      Use Atom. I love it

  • @JamesTindall
    @JamesTindall 7 років тому +3

    var a = function(){}; console.log(typeof a);

  • @Agugz
    @Agugz 7 років тому +3

    Didn’t understand symbols

  • @ptaczek
    @ptaczek 7 років тому +1

    Hi, there is no data type null in javascript. If you declare a variable without initialization, it's type is "undefined". But if you initialize the variable to null, it's type is "object". As you said, null is a value that means "no value". Null is not a data type.

    • @BeauCarnes
      @BeauCarnes 7 років тому +4

      I respectfully disagree. 😊 developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript and docs.microsoft.com/en-us/scripting/javascript/data-types-javascript#the-null-data-type

    •  7 років тому

      Beau Carnes acording to ecma-262 Null is a type. null is the only a value

    • @ptaczek
      @ptaczek 7 років тому +1

      I see. The thing is, these ecma specifications are the ideal tha is not achieved in modern implementations of JS. I doublechecked both latest Chrome and latest Node and there simply is no Null type. The typeof null returns 'object' in both cases. I haven't checked SpiderMonkey though. So from practical perspective there is no Null type you could use to initialize a variable like let n = new Null();

    • @ptaczek
      @ptaczek 7 років тому

      Call it a bug in JS :) Typeof undefined is 'undefined' but typeof null is 'object'. Specifications are only that: specifications. But whenever you look there is no Null data type you could use in current JS implementations I checked.

  • @sheikh4awais
    @sheikh4awais 7 років тому

    which code editor are you using?

    • @BneiAnusim
      @BneiAnusim 7 років тому

      It looks like codepen.io

    • @lostdesign
      @lostdesign 7 років тому

      This seems to be codepen.io - i suggest using atom, sublime or vscode. I do switch between sublime and atom from time to time.

    • @BeauCarnes
      @BeauCarnes 7 років тому

      codepen.io

    • @andrewholdun5375
      @andrewholdun5375 7 років тому

      Beau in codepen how do I set it up to see the JS running live on the right?

    • @BeauCarnes
      @BeauCarnes 7 років тому +1

      In this video I am using Chrome's JavaScript console under 'view->developer->JavaScript Console'. Usually I use CodePen's console. To open click the 'console' button in the bottom left corner. To make CodePen's console appear on the right you have to click 'Change View' in the top right and change the layout.

  • @rahulbawa6732
    @rahulbawa6732 7 років тому +2

    Hi Beau. Thanks for putting so much effort into this . This tutorial is just amazing.
    I have a question. Why does plus operator and multiplication operator behave differently when used with a null value.
    1 + null = 1;
    but
    1 * null = 0;

    • @RogueSergeant
      @RogueSergeant 7 років тому +2

      Because you're adding 1 to 0. And you can't multiply anything with 0.

    • @jatinc6058
      @jatinc6058 7 років тому

      can't you? you can multiply and will get an answer of 0.

  • @drdzdd
    @drdzdd 4 роки тому

    Bean means beautiful in French ! Where did you get that name you lucky guy

  • @jatinc6058
    @jatinc6058 7 років тому

    Thanks for these tutorials, big fan of FCC. Ok, the undefined and Null is not, ahem, well defined. :). Speaking from what I have learnt from FCC itself, here is an e.g. of undefined -a bit different from Null.
    var test = function(a,b) {
    a+b;
    }
    console.log(test(1,2)); //this will give you undefined

    • @ПавелТрофимов-м8з
      @ПавелТрофимов-м8з 7 років тому

      Could you clarify your example? Seems like your function just doesn't return result. How is it connected to undefined? If you change a + b into return a + b - it's working just fine.

  • @AmirLT-x6y
    @AmirLT-x6y 8 місяців тому

    Are this course actually in 2024?

  • @lawrencekin02
    @lawrencekin02 7 років тому

    any code editor will do just fine for Javascript

  • @ToriKo_
    @ToriKo_ 4 роки тому

    Objects in JS seem to work like how I guess you would use a dictionary in Python

  • @smyasir0
    @smyasir0 6 років тому +1

    GRAND SUMMARY
    Booleans - Watch in video.
    Null - means nothing or zero if you do math with it ! Use when some variable has no value assigned to them.
    Undefined - is not similar to null. means that a variable has either not been declared at all OR has been declared but holds no value. yield NaN if you do math with it. Is NOT zero.
    Number - Watch in video.
    Symbols - Their instances are unique and immutable. so if two symbols,
    sym1 = Symbol ("foo") and sym2 = Symbol ("foo") are compared; sym1 === sym2 , it will give false.
    if you typecast them both to string, it will give true ! but typecasting to string also means that it will print like "Symbol(foo)" in console ...
    Object - It is a collection of properties. Properties themselves are key-value pairs.

  • @JordanWayman
    @JordanWayman 2 роки тому +1

    The real question is how many people from The odin project are here? 🤔 TOP RULES!

  • @juancarlosortega7278
    @juancarlosortega7278 6 років тому

    console.log("algo que seria genial, es que tuviera subtitulo en español.");

    • @gamingfury228
      @gamingfury228 4 роки тому

      Something that would be great is that it had a subtitle in Spanish.

  • @mdrohimsikder7669
    @mdrohimsikder7669 6 років тому

    Your name is very hard............... what a difficult name? I can not synonym it though................

  • @aaronargottelopez3488
    @aaronargottelopez3488 4 роки тому