Statements Reference

Next ❯Functions Reference

  • turned_in_notVariable Statements
    StatementsUsed
    constTo declare a variable inside brackets scope (read-only)
    letTo declare a variable inside brackets scope
    varTo declare a variable inside functional or global scope


  • turned_in_notConditional Statements
    StatementsUsed
    if__else__else ifTo execute a block of statements depending on a condition is true
    switch__case__defaultTo execute a block of statements depending on different cases


  • turned_in_notLoop Statements
    StatementsUsed
    do__whileTo execute a block of statements and repeats the block while a condition is true
    forTo execute a block of statements as long as a condition is true
    for__inTo execute a block of statements for each elements of an object (or array)
    for__ofTo execute a block of statements for each elements of an array
    whileTo execute a block of statements while a condition is true


  • turned_in_notCore Statements
    StatementsUsed
    classTo declare a class
    functionTo declare or define a function
    importTo import functions/classes/objects exported from an external module
    exportTo export functions/classes/objects to be available for imports in external modules
    use strictTo execute statement in strict mode, help to write secure codes


  • turned_in_notInline Statements
    StatementsUsed
    breakTo exit from a switch or a loop
    continueTo skip an iteration (in the loop) if a specified condition is true
    lebel: To jump to a statement with an specified lebel that you can refer it via break or continue statement
    returnTo stop the execution of a function and returns a value from that function
    debuggerTo stop the execution of javascript, and calls the debugging function (if available)


  • turned_in_notError Statements
    StatementsUsed
    throwTo throw (generates) an error
    try__catch__finallyTo execute a block of statements when an error occurs in a try block, and implements error handling in a catch block and executes finally block statements (if any)


  • turned_in_notPromise Statements
    StatementsUsed
    PromiseTo create a promise call, which assures to return any result on resolution/rejection
    async functionTo create async function expression
    awaitTo pause and resume an async function and wait for the promise's resolution/rejection result, only be used inside async function


  • turned_in_notGenerator Statements
    StatementsUsed
    function*The function* keyword defines a generator function expression
    yieldTo pause and resume a generator function
    yield*To delegate to another generator function or iterable object

  • Functions Reference
❮ Prev Operators Reference
Next ❯Functions Reference
TryOut Examples"Learn to Explore..!"

TryOut Editor

receipt