Jayaprakash Manda’s Post

𝗣𝗹𝗮𝘆𝘄𝗿𝗶𝗴𝗵𝘁 𝘄𝗶𝘁𝗵 𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁 & 𝗧𝘆𝗽𝗲𝗦𝗰𝗿𝗶𝗽𝘁 – 𝗗𝗮𝘆 𝟴 𝗝𝘂𝗺𝗽𝗶𝗻𝗴 𝗦𝘁𝗮𝘁𝗲𝗺𝗲𝗻𝘁𝘀 Jumping statements are control statements that immediately change the normal flow of program execution. they jump from one place in the code to another place. 𝟭. 𝗕𝗿𝗲𝗮𝗸 used to break the loop intentionally, when a specific condition is met.  𝗯𝗿𝗲𝗮𝗸; 𝟮. 𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗲 used to skip the current iteration and move to the next iteration when a specific condition is met 𝗰𝗼𝗻𝘁𝗶𝗻𝘂𝗲; 𝟯. 𝗥𝗲𝘁𝘂𝗿𝗻 return exists a function and optionally send a value back to the caller ex: function add(a:number, b:number) : number{ 𝗿𝗲𝘁𝘂𝗿𝗻 a+b; } 𝟰. 𝗧𝗵𝗿𝗼𝘄 throw stops program execution by throwing an error. ex: function withdraw(amount:number){ if(amount<=0){ 𝘁𝗵𝗿𝗼𝘄 new Error ("Invalid Amount") } Follow me for regular insights on 𝗣𝗹𝗮𝘆𝘄𝗿𝗶𝗴𝗵𝘁 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻 𝗧𝗲𝘀𝘁𝗶𝗻𝗴. #JavaScript #TypeScript #NodeJS #Playwright #AutomationTesting #SoftwareTesting #QA #LearningInPublic #TestAutomation

To view or add a comment, sign in

Explore content categories