Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on JavaScript Pattern Matching Proposal. Parent comment
So this:
function getStatus(status) { if (status === 200){ return "Success"; } else if (status === 401){ return "Fail!"; } } var myString = getStatus(response.status);
var myString = match (status) { {200} => "Success", {401} => "Fail!" }
var myString = match (status) { 200 => "Success", 401 => "Fail!" }
So this:
Now becomes this: