Standard (chrome, FF, safari, Edge) • Fino a 1000 righe (FF) • Utile con array e mappe, meno con oggetti complessi • Da qualche anno ormai i devTools spacchettano Object 6
{ console.log("Hello, " + name +". You've called me " + i+1 + " times."); } [13:14:13.481] Hello, Bob. You've called me 1 times. [13:14:13.483] Hello, Bob. You've called me 2 times. [13:14:13.485] Hello, Bob. You've called me 3 times. [13:14:13.487] Hello, Bob. You've called me 4 times. [13:14:13.488] Hello, Bob. You've called me 5 times. COMMON PATTERN
{ console.log("Hello, %s. You've called me %d times.", name, i+1); } [13:14:13.481] Hello, Bob. You've called me 1 times. [13:14:13.483] Hello, Bob. You've called me 2 times. [13:14:13.485] Hello, Bob. You've called me 3 times. [13:14:13.487] Hello, Bob. You've called me 4 times. [13:14:13.488] Hello, Bob. You've called me 5 times. BETTER SOLUTION