Table of contents Home page
Execute this code
// Operator precedence: 15 // Operator associativity: left-to-right function f(lang) { if (lang == "eng") { return function g(x) {return x == 0 ? "Hello" : "Goodbye"} } else if (lang == "dut") { return function h(x) {return x == 0 ? "Hallo" : "Tot ziens"} } } // f("dut")(0) == (f("dut"))(0) == h(0) == "Hallo" alert(f("dut")(0))