Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript keywords

await : runs functions asynchronously
break : stops a for loop
case : used un switch statements
catch : part 2 of a trycatch statement, runs if code in try statement fails
class : defines a class
const : defines a constant variable (it cant be changed after defined)
continue : skips to the next number in a for loop
debugger : i dont know what it does
do : if used in while loop ,then if the boolean slot is false,it will run one time only
else : executes the code inside if the boolean slot in an if statement is false
false : boolean value
for : a type of loop
function : defines a function
if : if the boolean slot is true then the code inside will run
import : imports other javascript files
in : checks if an element is in a specific array
instanceof : i dont know what it does
let : similar to var but defines the variable only inside of this scope
new : defines a new object of a specific class type
null : similar to undefined but its type is object instead of undefined
return : defines the return value of a function
switch : similar to if statement but its multiplied and checks if a value is what its says in each case and if its that variable then it runs the code inside of that case
throw : throws an error (also works in trycatch statements)
try : if the code inside throws an error then its runs the code inside catch statement
true : boolean value
typeof : gets the type of a specific value
var : defines a variable
while : this loop runs until the boolean slot becomes false
 
PREVIOUS NEXT
Tagged: #javascript #keywords
ADD COMMENT
Topic
Name
7+6 =