Questions

JavaScript questions

Choose a question page, learn the concept, then test your understanding with a quiz.

What Is JSONP in JavaScript? Why It Was Created and How It Works

Learn what JSONP is, why it was created, how it bypassed browser restrictions, and when to use modern alternatives like CORS.

javascriptjsonjsonpterminology

What the Double Exclamation Mark (!!) Does in JavaScript

Learn what !! means in JavaScript, how it converts values to true or false, and when to use it with clear examples and common pitfalls.

javascriptoperators

When to Use Node.js: Choosing It for Web Applications

Learn when Node.js is a strong choice, how its event loop handles I/O, and how to compare it with PHP, Python, and Ruby for web apps.

javascriptnode.jsweb-applications

Where to Put Script Tags in HTML: defer, async, and Body Placement

Learn where to place JavaScript script tags in HTML, how defer and async affect loading, and reliable patterns for modern web pages.

javascripthtml

Why Browsers Enforce CORS but Postman Does Not in JavaScript

Learn why browser JavaScript gets CORS errors while Postman works, and how Same-Origin Policy affects fetch and XMLHttpRequest.

javascriptjquerycorspostman

Why Some JSON Responses Start with while(1); in JavaScript

Learn why APIs prepend while(1); to JSON, how it helps prevent JSON hijacking, and what safer modern alternatives exist.

javascriptjsonajaxsecurity

Why `++[[]][+[]] + [+[]]` Returns "10" in JavaScript

Learn why `++[[]][+[]] + [+[]]` evaluates to "10" in JavaScript by understanding coercion, unary plus, increment, and string conversion.

javascriptsyntaxjsfuck

Why for...in Is Bad for Array Iteration in JavaScript

Learn why JavaScript for...in is unsafe for arrays, how inherited properties affect loops, and when to use for...of or array methods instead.

javascriptarraysloopsfor-loop

Writing Files in Node.js with the fs Module

Learn how to write text and JSON files in Node.js using the built-in fs module, including async, promise-based, and safe file-writing patterns.

javascriptnode.jsfileexpress

event.preventDefault() vs return false in JavaScript and jQuery

Learn the difference between event.preventDefault() and return false in JavaScript and jQuery, including propagation, defaults, and best practices.

javascriptjqueryevent-handlingdom-events

jQuery .prop() vs .attr(): Understanding Properties and Attributes

Learn the difference between jQuery .prop() and .attr(), when to use each, and why style, checked, and selected behave differently.

javascriptjquerydomattr

Page 8 of 8 - 151 questions