Security
JavaScript learning path
Master security through 10 carefully ordered interview questions. Each lesson includes a detailed explanation, practical example, common mistakes, and an interview-ready summary.
10 questions3 easy · 4 medium · 3 hard difficulty mix≈ 50 min total study time
Start this learning path Quick knowledge check
Test your Security knowledge
Match five interview questions to their best answers. Your result stays on this device.
Table of contents
Work through the questions in order for a guided path, or jump directly to the concept you want to review.
01What is the same-origin policy?medium · mid level · 5 min read02What is CORS?hard · senior level · 5 min read03What is cross-site scripting (XSS)?easy · junior level · 5 min read04How do you prevent XSS in a web application?medium · mid level · 5 min read05What is CSRF and how can it be mitigated?hard · senior level · 5 min read06Why is `eval` dangerous?easy · junior level · 5 min read07How should sensitive data be stored in the browser?medium · mid level · 5 min read08What are secure cookie attributes?hard · senior level · 5 min read09What is Content Security Policy?easy · junior level · 5 min read10How do you validate and sanitize user input?medium · mid level · 5 min read