MDN | MDN Curriculum | Playground | HTTP Observatory | About MDN | Advertise with us | Community | Blog | MDN Plus | MDN Discord | HTML: Markup language | Elements | Global attributes | Attributes | See all… | Responsive images | HTML cheatsheet | Date & time formats | See all… | SVG | MathML | XML | CSS: Styling language | Properties | Selectors | At-rules | Values | See all…
Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Using an assignment as a condition
You should almost never have an if...else with an assignment like x = y as a condition:
Conditional (ternary) operator
This page was last modified on May 4, 2026 by MDN contributors.
Equality comparisons and sameness
Enumerability and ownership of properties