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

Code block in JavaScript

if statements don’t decide on skipping or running the entire code. They only make decisions about a piece of code.

This piece of code is called a code block. We write it between curly braces {}.

jsx
if (true) { console.log("I'm a code block!"); }