Errors type | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Errors type

What is syntaxError and typeError?

18th Nov 2018, 8:20 AM
Rex Hung
3 Answers
+ 6
syntax error is caused by not following the proper structure or syntax of the language. e.g. forgetting a semicolon at the of a statement in java, improper indentation in python. type error happens when you pass a variable or object to a function or operation it has no business with. e.g. passing a string to a function when int is needed
18th Nov 2018, 8:52 AM
Lambda_Driver
Lambda_Driver - avatar
+ 1
Thanks
18th Nov 2018, 4:29 PM
Rex Hung
0
Syntax error, something is wrong in code TypeError, it seems you're using wrong variable type
18th Nov 2018, 8:48 AM
Taste
Taste - avatar