Introduction to JavaScript

JavaScript is a high-level programming language that all modern web browsers support. It is also one of the core technologies of the web, along with HTML and CSS that you may have learned previously. This section will cover basic JavaScript programming concepts, which range from variables and arithmetic to objects and loops.

Go to the first lesson

Upcoming Lessons

Comment Your JavaScript CodeDeclare JavaScript VariablesStoring Values with the Assignment OperatorInitializing Variables with the Assignment OperatorUnderstanding Uninitialized VariablesUnderstanding Case Sensitivity in VariablesAdd Two Numbers with JavaScriptSubtract One Number from Another with JavaScriptMultiply Two Numbers with JavaScriptDivide One Number by Another with JavaScriptIncrement a Number with JavaScriptDecrement a Number with JavaScriptCreate Decimal Numbers with JavaScriptMultiply Two Decimals with JavaScriptDivide One Decimal by Another with JavaScriptFinding a Remainder in JavaScriptCompound Assignment With Augmented AdditionCompound Assignment With Augmented SubtractionCompound Assignment With Augmented MultiplicationCompound Assignment With Augmented DivisionDeclare String VariablesEscaping Literal Quotes in StringsQuoting Strings with Single QuotesEscape Sequences in StringsConcatenating Strings with Plus OperatorConcatenating Strings with the Plus Equals OperatorConstructing Strings with VariablesAppending Variables to StringsFind the Length of a StringUse Bracket Notation to Find the First Character in a StringUnderstand String ImmutabilityUse Bracket Notation to Find the Nth Character in a StringUse Bracket Notation to Find the Last Character in a StringUse Bracket Notation to Find the Nth-to-Last Character in a StringWord BlanksStore Multiple Values in one Variable using JavaScript ArraysNest one Array within Another ArrayAccess Array Data with IndexesModify Array Data With IndexesAccess Multi-Dimensional Arrays With IndexesManipulate Arrays With push()Manipulate Arrays With pop()Manipulate Arrays With shift()Manipulate Arrays With unshift()Shopping ListWrite Reusable JavaScript with FunctionsPassing Values to Functions with ArgumentsGlobal Scope and FunctionsLocal Scope and FunctionsGlobal vs. Local Scope in FunctionsReturn a Value from a Function with ReturnUnderstanding Undefined Value returned from a FunctionAssignment with a Returned ValueStand in LineUnderstanding Boolean ValuesUse Conditional Logic with If StatementsComparison with the Equality OperatorComparison with the Strict Equality OperatorPractice comparing different valuesComparison with the Inequality OperatorComparison with the Strict Inequality OperatorComparison with the Greater Than OperatorComparison with the Greater Than Or Equal To OperatorComparison with the Less Than OperatorComparison with the Less Than Or Equal To OperatorComparisons with the Logical And OperatorComparisons with the Logical Or OperatorIntroducing Else StatementsIntroducing Else If StatementsLogical Order in If Else StatementsChaining If Else StatementsGolf CodeSelecting from Many Options with Switch StatementsAdding a Default Option in Switch StatementsMultiple Identical Options in Switch StatementsReplacing If Else Chains with SwitchReturning Boolean Values from FunctionsReturn Early Pattern for FunctionsCounting CardsBuild JavaScript ObjectsAccessing Object Properties with Dot NotationAccessing Object Properties with Bracket NotationAccessing Object Properties with VariablesUpdating Object PropertiesAdd New Properties to a JavaScript ObjectDelete Properties from a JavaScript ObjectUsing Objects for LookupsTesting Objects for PropertiesManipulating Complex ObjectsAccessing Nested ObjectsAccessing Nested ArraysRecord CollectionIterate with JavaScript While LoopsIterate with JavaScript For LoopsIterate Odd Numbers With a For LoopCount Backwards With a For LoopIterate Through an Array with a For LoopNesting For LoopsIterate with JavaScript Do...While LoopsProfile LookupGenerate Random Fractions with JavaScriptGenerate Random Whole Numbers with JavaScriptGenerate Random Whole Numbers within a RangeUse the parseInt FunctionUse the parseInt Function with a RadixUse the Conditional (Ternary) OperatorUse Multiple Conditional (Ternary) Operators