jsrosetta

const you = new NodeDeveloper();

Write Node.js? Read every other language.

Each post takes a familiar JavaScript concept and sets it next to the equivalent code in other languages. Pick a language in any code block and the whole page follows.

Basics

Variables and Constants

What const and let in Node.js correspond to in Go, Rust, Swift, and Java.

  • Node.js
  • Go
  • Rust
  • Swift
  • Java

Async

Async/Await

How Node.js's Promise and async/await compare to goroutines (Go), Future + tokio (Rust), Swift concurrency, and CompletableFuture (Java).

  • Node.js
  • Go
  • Rust
  • Swift
  • Java

Error handling

Error Handling and try/catch

How Node.js's throw and try/catch/finally compare to error values in Go, Result in Rust, throws in Swift, and exceptions in Java.

  • Node.js
  • Go
  • Rust
  • Swift
  • Java