Questions Concepts
GitHub icon


Conditionals - language feature

< >
Example from JavaScript, TypeScript:
if (true) console.log("hi!")
Example from Python, Cython:
if True: print("Hello world")
Example from Elixir:
if true do IO.puts("Hello world") end
Example from Pug:
- var user = {description: 'foo bar baz'} - var authorised = false #user if user.description Description p.description= user.description else if authorised Description p.description. User has no description, why not add one... else Description p.description User has no description
Example from Slope:
(if positive? 1 -1)
Example from Jule:
if BOOLEAN_EXPRESSION { outln(""Condition is true) }
Example from BALGOL:

Languages with Conditionals include Java, JavaScript, Python, C, C++, PHP, Perl, Ruby, C#, R, Go, Swift, Scala, Ada, Rust, Kotlin, PowerShell, Pascal, Haskell, TypeScript, Lua, Julia, Bash, Objective-C, Elixir, Erlang, Scheme, Dart, Solidity, Verilog, Reason, Crystal, CoffeeScript, F#, OCaml, Groovy, VHDL, Pug, Chapel, ABAP, Dylan, AutoIt, X10, Opa, F*, Clean, SystemVerilog, HCL, Cython, C3, ATS, Bicep, Speedie, Twig, Maxima, janet, Koka, HOPE, Felix, progsbase, Slope, Jule, Angelscript, Pizza, Apex, C2, Flow9, Q#, Ligo, PowerQuery M, JS++, Sophia, BALGOL, fp, nimrod, Oracle Java, Deesel, Tick C, cooC, ADLIB, Extended Pascal

Languages without Conditionals include HTML, XML, JSON, JSON5, Ion, JSONiq, JSON with Comments, Superjson, Jsonnet, Hocon

This question asks: Does the language have conditional statements and/or conditional expressions?

Read more about Conditionals on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 Logout