O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

JSFlashcards

test test Computer Studies MCAT Inglês 32 flashcards 1.358 visualizações

Flashcards do conjunto (32)

  1. 1whats the diff between let and varlet is scoped to the code block
    var is scoped to the function block
    use let
  2. 24 rules for variable names`cant be reserved
    should be meaning
    cant start with number
    cant have space or -
  3. 3variable typesprimitives and referenct types
  4. 4primitive typesstring
    numbers
    boolean
    undefined
    null
  5. 5undefined typeall vars set by default
  6. 6dynamic typingthe types can change with use
  7. 7what is special about undefinedits a type and a value
  8. 8reference typesobject
    array
    function
  9. 9example of object literallet person = {}
  10. 10make a person objectlet person = {
    name: 'test',
    age: 44
    };
  11. 11accessing an objects props 2 types and exameplsdot notation and bracket notation
    person.name
    person['name']
  12. 12why use bracket notiationwhen you dont know the name of the property at dev, but only at runtime
  13. 13example of an array literallet selectedColors = [];
  14. 14what does === meanstrict equality
    compare type and value
  15. 15what does == mean, and how does it do it?loose quality, just compare values, not types so
    1 is the same as '1'
    it takes the type on left, converts the type on right and then does ===
  16. 16example of ternarylet type = pts > 100 ? 'true result' : 'false result'
  17. 17logical operator and non boolthis is when you try to compare diff types of values
  18. 18Falsy valuesfalse
    0
    '' or ""
    null
    undefined
    NaN
  19. 19example of switchlet role;
    switch (role) {
    case "test": {
    console.log("sd");
    break;
    }
    default: {
    console.log("sdss");
    }
    }
  20. 20for in loopthis is to view the props of an object
    for (let key in someobject)
    {
    console.log(key);
    }
  21. 21diff between : and =: is for Literal Notiation, for key value pairs
    {
    name : 'test'
    }
    this is a shortcut just for object literal notations
    = is for Assignment
    name = 'test'
  22. 22what is hoistingwhen js runs, it takes all the f declarations and moves them to the top.
    thats why you can run a declared function before its defined.
  23. 23what is 'this'its the object thats executing the current function
  24. 244 pillars of OOPencapsulation
    abstraction
    inheritance
    polymorphism
  25. 25encapsulationincrease usablity
    group related data and funcs into a unit and then ref that unit when needed
    this is an object with Properties and methods
  26. 26simple diff between oop and proceduralprocedural has funcs with lots of params, its how the data gets in
    Opp creates objects with minimal or no params, so that you just have to call the func, and it has access to the props in the object
  27. 27abstractionsimplify the interface to O, hide complexity
    reduces the impact of change because the use is simple
  28. 28inheritanceby creating base O, you can create objects based on that baseO that dont have to have all the dup methods and props.
  29. 29polymorphismmany forms
    a bunch of objects, might have the same func render(), but each of them will do it differently. but all will have a render()
  30. 30what is closureits the scoping of properties to inside methods,
  31. 31How do you do oop with classic JS? when there are no classesprototypes
    a proto is a parent object
  32. 32how does JS engine search for a method or propstarts with the current obj, and if it cant find it, it will crawl up the proto chain until it finds it

Informações

Descrição
MCAT Computer Studies FlashCards sobre JSFlashcards, criado por test test em 04-01-2019.
Criado por
test test
Visualizações
1.358
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?