Conditionals ============ ```Example from 1 languages: JavaScript if (true) console.log("hi!") ``` ```Example from 1 languages: Python if True: print("Hello world") ``` ```Example from 1 languages: Lua if true then print("true") end ``` ```Example from 1 languages: Elixir if true do IO.puts("Hello world") end ``` ```Example from 1 languages: Pug - var user = {description: 'foo bar baz'} - var authorised = false #user if user.description h2.green Description p.description= user.description else if authorised h2.blue Description p.description. User has no description, why not add one... else h2.red Description p.description User has no description ``` ```Example from 1 languages: Chapel if then else ``` ```Example from 1 languages: Lil if 1 print["true"] end ``` ```Example from 1 languages: Slope (if positive? 1 -1) ``` ```Example from 1 languages: Jule if BOOLEAN_EXPRESSION { outln(""Condition is true) } ``` ```Example from 1 languages: Slab if true p A. else p B. ``` ```Example from 1 languages: plang - if %products.Count% > 0 then - go through %products% call !ProcessProduct ``` ```Example from 1 languages: BALGOL EITHER IF A > B$ FWD = 1$ OTHERWISE$ FWD = 0$ ``` * Languages *with* Conditionals include JavaScript, C, Python, Java, Perl, Ruby, PHP, Go, C#, R, PowerShell, Bash, Rust, Swift, Scala, Lua, Kotlin, Haskell, CoffeeScript, Elixir, Erlang, Objective-C, Julia, Dart, Solidity, Pascal, Ada, Crystal, Reason, Pug, Scheme, Chapel, Groovy, OCaml, F#, HCL, VHDL, C3, F*, ABAP, Verilog, Wa-lang, Koka, Bicep, Janet, Opa, Lil, SystemVerilog, Twig, C2, progsbase, Toit, Clean, Slope, AutoIt, Felix, Dylan, Flow9, X10, Maxima, Veryl, ATS, Jule, Angelscript, Ligo, Apex, HOPE, Sophia, fp, Aardvark, JS++, Speedie, Slab, PowerQuery M, plang, Q#, nimrod, BALGOL * Languages *without* Conditionals include HTML, XML, JSON, mmCIF * View all concepts with or missing a *hasConditionals* measurement http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasConditionals&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22null%22%2C%22data%22%3A%22hasConditionals%22%2C%22origData%22%3A%22hasConditionals%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D missing http://pldb.info/../lists/explorer.html#columns=rank~id~appeared~tags~creators~hasConditionals&searchBuilder=%7B%22criteria%22%3A%5B%7B%22condition%22%3A%22!null%22%2C%22data%22%3A%22hasConditionals%22%2C%22origData%22%3A%22hasConditionals%22%2C%22type%22%3A%22num%22%2C%22value%22%3A%5B%5D%7D%5D%2C%22logic%22%3A%22AND%22%7D with * Read more about Conditionals on the web: 1. https://en.wikipedia.org/wiki/Conditional_(computer_programming) 1. Built with Scroll v178.2.3