DEV Community

VICTOR OMONDI
VICTOR OMONDI

Posted on

3 1

Ternary operator in Python vs Javascript

Python

result = [on_True] if (condition) else [on_False]
Enter fullscreen mode Exit fullscreen mode

Javascript

let result = (condition) ? [on_true] : [on_false]
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

Retry later