YDKJS get started Flashcards
what is a transpiler?
it is a tool that converts js code to an old compatible version
what is an example of a transplier?
babel
what do u use to be compatible with old syntax?
transpiler
what do u use to be compatible with new methods?
polyfill
is js interpreted?
kind of but more of a compiled language as we know static errors before actually running the code which means the script is parsed before it’s ran
how does js files share their funcionality?
1 - global scope
2 - modules
what are the types of js values?
1 - primitive
2 - objects
what are the primitive types of js?
1 - strings 2 - int 3 - bigInt 4 - undefined 5 - null 6 - symbol
what is the difference between var and let?
let is block scoped
what happens when you change the value inside a CONST array?
you can change the value but you cannot change the array itself
what is the difference between function declaration and function expression?
1 - function declaration happens during compile time function name(){ }
2 - function expression happens during interpretation time var const let name = function (){ }
how does js treat functions?
as a sub-type of object namely ‘function’ and can be assigned
what does === mean?
check for type and value
what are the values that === lies about?
1 - Nan === Nan
2 - 0 === -0 -> checks for object.is()
3 - object types
why does === does not work for objects?
because it checks for the reference meaning the address no the values inside the object