1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Errors
this happens due to misconceptions when solving a problem, improper use and typos of the programming language, or the inability to predict user behavior.
syntax
the “grammar" in the programming language.
a set of rules that defines the structure of the instructions.
keywords
“vocabulary” or the list of words that can be used to build instructions.
syntax error
this error violates the language syntax rule, as a declarative sentence should end with a period.
semantic error
this new word is not recognizable in the vocabulary of the natural language, thus creating an error.
can also be a word that is out of context, such as male instead of mall.
logical error
it is an error as it is not what was originally the intended direction compared to the original message.
this error is not easily detectable by the compiler.
SyntaxError
this appears when a code is ill-informed.
when typos occur or when unmatching parenthesis or brackets.
ReferenceError
this error occurs when the programmer tries to access a function or a variable that does not exist.
TypeError
this error occurs when a specific value is not of the expected type, such as changing the constant value or checking the length of a variable that is not a string.
RangeError
this error is generated when a value is passed to a function outside its acceptable range.
Exceptions
when JavaScript detects syntactic or semantic errors, it generates and throws specific objects with information about the encountered error.
in syntax errors, the JavaScript engine does not allow the program to run and uses the console to show the error message.
run-time errors or exceptions
appear while the program is running.
exception/error handling
is done to prevent the program from stopping in such a situation.
finally statement
just like catch block, this is also an optional block of the try statement, although at least one of them is required or a SyntaxError is thrown.
Debugging
is part of troubleshooting in programming.
this statement causes the program to stop or halt its execution on the line where it is placed on waits for a decision.
Step by Step Program Exception
it is a debugger feature to execute codes on a step by step basis.
it means program execution can be stopped at any place using the debugger statement and then continue the execution one instruction at a time.
RESUME
STEP INTO
STEP OVER
STEP OUT
Resume
resumes the execution of the script typically.
debugger runs the program and “breaks” on user-defined breakpoints
Step Into
treats the function as a set of instructions intended to be executed separately.
is used when the code needs to be analyzed in detail.
Step Over
is used when the next instruction is a call to a function where the impact is unclear or uninterested.
treats the function call as something indivisible.
Step Out
allows to immediately jump out of a function where the code is paused.
this action proceeds until the function returns if the debugger is within the code block.