Fundamentals Flashcards
(38 cards)
What is javascript?
A high-level, Object Oriented, Multi-Paradigm Programming language
What is a value?
Piece of data
What is a variable?
A named reference to a variable. It is a boxed that we store to values
What are the rules of declaring a variable?
- It is declared with the camelCase notition
- Variable names can’t start with a number
- Variable names can only include letters, numbers, _ and $
- Variable names can’t use reserved keywords.
- Variable names shouldn’t start with a Capital letter
What are the primitive data types?
String, Number, Boolean, undefined, null, symbol and bigint
What is a string?
A sequence of characters used to represent text.
What is a number
Number is a numeric data type
What is a boolean?
A logical data type that can only have true or false as values.
What is a undefined data type?
A value that is automatically assigned to a variable that is just been declared.
What is a null data type?
a value that represents a reference that points to a nonexistent or invalid object or address.
What does Dynamic typing in a language mean?
The data type of the value is automatically defined. The programmer doesn’t need to do this manually.
How can you declare a variable?
With the const, let and var keywords.
What does reassigning and mutate mean?
Changing the value of the variable.
Why should you only use let or const instead of var
Because it will be block scoped and not function scoped
What do operators do?
Allows us to transform and/or multiply values
What is a syntax?
The structure of statements in a computer language
What are some basic math operators
+, -, /, *, **
What do assignment operators do?
An assignment operator assigns a value to its left operand based on the value of its right operand.
What do comparison operators do?
A comparison operator compares its operands and returns a logical value based on whether the comparison is true.
What is operator precedence?
Operator precedence determines how operators are parsed concerning each other. Which operator executes first?
What the syntax of template literal?
...
How to use multiple lines when using string operators?
with \n\
How is the structure of the if else statement called?
control structure.
What is type conversion?
Type conversion (or typecasting) means transfer of data from one data type to another.