Side-by-side, interactive cheatsheets for JavaScript programmers
comparing JavaScript to other languages. Every example runs live in your browser — no
setup, no installation.
Choose your own path by reordering languages
JavaScript's flexibility, but with static types, true concurrency, and a single deployable binary. Go trades the event loop and dynamic typing for goroutines, compile-time type safety, and 10–100× faster CPU-bound throughput.
async/await runs on a single thread and never uses multiple CPU coresundefined is not a function errors in productionnull/undefined confusion — every type has a defined zero value; accessing an uninitialized variable gives a predictable 0 or "", never undefinedgo build produces one file with no runtime to install, no node_modules, no version manager needed on the serverThe language of data and scripting, Python is where most JavaScript developers go for data science, machine learning, and serious back-end work.
None instead of both null and undefined== with no coercion — no === needed[x*2 for x in items]) in place of map/filter chainsself and an __init__ constructor, no newThe language that inspired Rails and shaped modern web development, Ruby offers a radically different model from JavaScript — pure OOP, synchronous-first, and expressive in a way that prioritizes human readability above all.
Flutter's language meets the web's language. Dart's sound null safety, typed collections, and async-first design offer a fundamentally different approach to safety and scalability than JavaScript's dynamic flexibility.
String can never be null; String? can. The compiler prevents null dereferences before the program runsfinal is Dart's const — variables are immutable by default; var is mutable (opposite of JavaScript's let/const semantics)List<int>, Map<String, double> — mixing types is caught at compile time, not discovered at runtimerequired — more explicit than JavaScript's destructuring pattern and enforced by the compilerThe pragmatic JVM language, Kotlin combines expressive syntax, null safety, and interoperability with Java — popular for Android and server-side development.
JavaScript's dynamism without the runtime surprises. Rust brings static types, memory safety without a GC, and true parallelism — while keeping closures, iterators, and expressive code patterns you'll recognize.
null or undefined — Option<T> makes absence explicit in the type system, eliminating an entire class of runtime errorsResult<T, E> makes every error path explicit and type-checked — no more silent throws propagating through async call stacksmatch — more powerful than switch, works on any type, and the compiler enforces handling every caseApple's modern language meets the web's language. Swift's type system, optionals, and protocols offer a fundamentally different approach to safety than JavaScript's dynamic flexibility.
let means constant in Swift — the reverse of JavaScript where let is mutable and const is fixedString?) replace null and undefined — absence is tracked in the type system, not discovered at runtimeswitch is exhaustive and far more powerful than JavaScript's — ranges, tuples, type checks, and where clauses all in one constructThe JavaScript you already know, with a type system that catches whole classes of bugs before they ship. TypeScript is a strict superset — every JS file is valid TS, and you adopt it at your own pace.
string, number, boolean, plus interfaces and aliases you define yourselfimplements declaration needed, just match the structureanyif-checks and eliminates impossible types as control flow progressesPartial, Pick, and Readonly — a whole algebra of type transformations with no runtime costOptimal software with no hidden control flow. Like C but with memory safety, error handling, and compile-time code execution built in.
OCaml meets JavaScript. ReScript compiles to clean JavaScript while enforcing a sound type system, algebraic data types, and exhaustive pattern matching — eliminating entire classes of bugs that JavaScript's dynamic nature permits.
option<string> is guaranteed to be Some("text") or None, never an accidental null{ type: "circle" } pattern — Circle(radius) is a typed constructor the compiler exhaustively checksswitch — the compiler errors if you miss any variant case, eliminating the silent default: return undefined bugs-> pipe operator chains operations left-to-right — composable with any function, not just methods on an object