Programming With JS


Start With the Big Picture of What You Want to Achieve, and Break That Down Into Smaller Steps. [1] Define the Goal [2] Design the Script [3] Code Each Step


Expressions

An expression evaluates into (results in) a single value. Broadly speaking there are two types of expressions.




«««< HEAD

OPERATORS

  1. ASSIGNMENT OPERATORS
  2. COMPARISON OPERATORS
  3. ARITHMETIC OPERATORS
  4. LOGICAL OPERATORS
  5. STRING OPERATOR

Operators

1. Assignment Operators

<!> Used to Assign a Value of the Right Operand to Its Left Operand in Js Using These Assignment Operators.

 Assignment Operators


2. Comparison Operators

«««< HEAD ** <!> Used to Compare Variables and Take Some Action Based on the Result of That Comparison. ** ** <!> the Javascript Comparison Operators Compare Two Operands Value and Return the Result in Boolean ( True or False). ** ======= <!> Used to Compare Variables and Take Some Action Based on the Result of That Comparison. <!> the Javascript Comparison Operators Compare Two Operands Value and Return the Result in Boolean ( True or False).

2334ca32295580e32d1829a82d70dc09dd9c7f87

 Comparison Operators


3. Arithmetic Operators

<!> Arithmetic Operators Are Used to Performing Mathematical Operations Between Numeric Operands.

 Arithmetic Operators


4. Logical Operators

«««< HEAD ** <!> Used to Compare Variables and Take Some Action Based on the Result of That Comparison. ** ======= <!> Used to Compare Variables and Take Some Action Based on the Result of That Comparison.

 Logical Operators


5. String Operator

** <!> The + Operator Can Also Be Used to Add (Concatenate) Strings.**

<!> The + Operator Can Also Be Used to Add (Concatenate) Strings.




What Is a Function?

<!> Functions Let You Group a Series of Statements Together to Perform a Specific Task ( One Code X Many Time.


[1] Creat a Function

We Can Create It in Two Different Ways :

1. Function Declaration Function Declaration: Starts With “function”

function getInfo() { Lines of Code; }

2. Function Expression

Function Expression: Starts With “var varName”

Var varName = function getInfo() { Lines of Code; }


[2] Calling a Function

Simply You Can Call It Like This - functionName();




GitHub Account © Masalha96