0% found this document useful (0 votes)
4 views

Introduction to JavaScript Course Sum-up

Uploaded by

deinar_jau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Introduction to JavaScript Course Sum-up

Uploaded by

deinar_jau
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Introduction to JavaScript

Variables and Constants


● Variable (let) is named storage of value for the multiple usages.

● Constant (const) is an unchangeable variable.


Data Types
● number is a numeric data type.

● string is a text data type. Writing in quotes (" or ').

● boolean is a logical data type (true or false).

● array is a collection of values. The most commonly used methods are push(),

pop(), unshift() and shift().


Basic operations
● Assignment (=).

● Math (+, -, *, etc.).

● Comparison (>=, <, ==, ===, etc.).

● Logical (AND &&, OR (||).

● String Concatenation (+ between strings).


Conditional Statements
● if (condition) {code block}

● else {code block} after if.

● else if (condition) {code block} for a few conditions.


Loops
● while (condition) {code block}.

● do (code block) while (condition).

● for (let counter; condition; counter++) {code block}.


Functions
● function myFunc(arg1, arg2, arg3) {code block}

● Call the function: myFunc(value1, value2, value3)

● Use the return keyword to return the value from a function.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy