From 9b7918d26f2473223c9d53e684d2060801fa9486 Mon Sep 17 00:00:00 2001 From: Fazilat Jahan <160049943+Fazilat-Jahan@users.noreply.github.com> Date: Sat, 27 Jul 2024 22:44:13 +0500 Subject: [PATCH] Update app.ts --- step00b_syntax_error/app.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/step00b_syntax_error/app.ts b/step00b_syntax_error/app.ts index a60dc5f7..1be0f5ec 100644 --- a/step00b_syntax_error/app.ts +++ b/step00b_syntax_error/app.ts @@ -1,3 +1,8 @@ -lett message = "Hello World";//syntax error -console.log(message); +// A syntax error in TypeScript occurs when the code you write does not follow the rules and structure of the language. These errors are detected during the compilation or parsing phase before the code is executed. + +let myName: string = "unknown person" + +console.log(myName.toUppercase()) //TypeScript throws syntax error: Property 'toUppercase' does not exist on type 'string'. Did you mean 'toUpperCase'? + +console.loger(myName); //TypeScript throws syntax error: Property 'loger' does not exist on type 'Console'. Did you mean 'log'?