Post

Everyday I wish there was a PHP "match" equivalent for JS, preferably with superpowers, like: const foo = match(props.project.user.age) { < 21 => '⚽', 21, 22, 23 => 'πŸ₯³', > 23 && < 30 => 'πŸ“š', >= 30 && < 66 => 'πŸ‘¨β€πŸ‘©β€πŸ‘§' default => 'πŸ«–' }

Glad I'm not the only one πŸ€—

0 reposts0 likes

No replies yet.