CodeRunBox
Compiler
Glossary
Example
Course
HTML
CSS
JavaScript
Python
Swift
TypeScript
SQL
React
What is Python?Aliasesand operatorArraysBooleansClassesCode blocksCommentsConditional statementsConsoleData structuresdatetime moduleDecoratorDictionariesDocstringsenumenumerate() functionEquality operatorException handlingFalseFile handlingFilter()FloatsFor loopsFormatted stringsFunctionsGeneratorGlobals()Greater than operatorGreater than or equal to operatorIf statementin operatorIndicesInequality operatorIntegersIteratorLambda functionLess than operatorLess than or equal to operatorList append() methodList comprehensionList count()List insert() methodList pop() methodList sort() methodListsLoggingmap() functionMatch statementMath moduleMerge sortMin()ModulesMultiprocessingMultithreadingNonenot operatorOOPor operatorParametersprint() functionProperty()Random modulerange() functionRecursionReduce()Regular expressionsrequests Libraryreturn statementround() functionSetsSQLiteString decode()String find()String join() methodString replace() methodString split() methodString strip()StringsTernary operatortime.sleep() functionTruetry...except statementTuplesVariablesWhile loopsZip function

Conditions in JavaScript

Values like true are called conditions. Statements relying on conditions are called conditionals.

Conditions decide if the code runs or gets skipped. They come in between parentheses.

jsx
if (true) { console.log("Hello there"); }