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 newFlutter'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 compilerKotlin is what you reach for when JavaScript's dynamism starts costing you more than it saves. Null becomes a type-checked possibility instead of a runtime landmine, data classes replace hand-rolled object literals with real equality, and when plus sealed classes give you the exhaustive branching a switch statement never enforced — all compiled ahead of time to the JVM.
String can never be null and String? must be handled before use; no more TypeError: Cannot read properties of null discovered at runtimedata class Person(val name: String, val age: Int) gets working equals, hashCode, toString, and copy(); a JavaScript object literal gets none of these for freetypeof guards or runtime shape-checking; a whole category of JavaScript bugs never reaches productionwhen — the compiler forces every case to be handled, something a JavaScript switch can never guaranteesuspend fun reads like sequential code and coroutineScope guarantees structured cleanup, a stronger guarantee than a bare Promise chain or dangling async callJavaScript'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 costA small, explicit systems language with no hidden control flow. Zig is where a JavaScript developer goes for native speed, manual memory, and compile-time guarantees.
u8, i32, f64) instead of one dynamic number?T) and error unions (!T) replace null/undefined and throwboolcomptime runs ordinary Zig at compile time — generics with no separate macro languageOCaml 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 objectThe 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.