Back to lesson Try it Yourself
JavaScript Errors & try...catch
JavaScript
Result

        
Expected output
Processing 3 item(s)
Order check finished
Problem: Quantity must be at least 1
Order check finished

Keyboard shortcuts

Ctrl + EnterRun the code
Ctrl + SSave in this browser
Ctrl + /Comment / uncomment line
Tab / Shift + TabIndent / outdent
Ctrl + Z / Ctrl + YUndo / redo
Ctrl + FFind (browser search)

Your code is saved automatically in this browser. Share copies a link that opens this exact code. Code runs in a safe sandbox – it can't see your account.

Are you sure?