Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - alone011

Pages: [1]
1
JavaScript Operators / Re: BITWISE OPERATORS
« on: October 18, 2017, 09:54:28 pm »
Bit operators work on 32 bits numbers. Any numeric operand in the operation is converted into a 32 bit number. The result is converted back to a JavaScript number.

Operator   Description   Example   Same as   Result   Decimal
&   AND   x = 5 & 1   0101 & 0001   0001    1
|   OR   x = 5 | 1   0101 | 0001   0101    5
~   NOT   x = ~ 5    ~0101   1010    10
^   XOR   x = 5 ^ 1   0101 ^ 0001   0100    4
<<   Left shift   x = 5 << 1   0101 << 1   1010    10
>>   Right shift   x = 5 >> 1   0101 >> 1   0010     2

2
JavaScript Operators / Re: LOGICAL OPERATORS
« on: October 18, 2017, 09:53:46 pm »
Logical Operators
Logical operators are used to determine the logic between variables or values.

Given that x = 6 and y = 3, the table below explains the logical operators:

Operator   Description   Example   
&&   and   (x < 10 && y > 1) is true   
||   or   (x === 5 || y === 5) is false   
!   not   !(x === y) is true   

3
JavaScript Operators / Re: COMPARISON OPERATORS
« on: October 18, 2017, 09:50:41 pm »
Comparison Operators
Comparison operators are used in logical statements to determine equality or difference between variables or values.

Given that x = 5, the table below explains the comparison operators:

Operator   Description   Comparing   Returns   
==   equal to   x == 8   false   
x == 5   true   
===   equal value and equal type   x === "5"   false   
x === 5   true   
!=   not equal   x != 8   true   
!==   not equal value or not equal type   x !== "5"   true
x !== 5   false   
>   greater than   x > 8   false   
<   less than   x < 8   true   
>=   greater than or equal to   x >= 8   false   
<=   less than or equal to   x <= 8   true   

4
JavaScript Operators / Re: STRING OPERATORS
« on: October 18, 2017, 09:48:46 pm »
JavaScript String Operators
The + operator, and the += operator can also be used to concatenate (add) strings.

Given that text1 = "Good ", text2 = "Morning", and text3 = "", the table below explains the operators:

Operator   Example   text1   text2   text3   Try it
+   text3 = text1 + text2   "Good "   "Morning"    "Good Morning"   
+=   text1 += text2   "Good Morning"   "Morning

5
JavaScript Operators / Re: ASSIGNMENT OPERATORS
« on: October 18, 2017, 09:46:14 pm »
JavaScript Assignment Operators
Assignment operators are used to assign values to JavaScript variables.

Given that x = 10 and y = 5, the table below explains the assignment operators:

Operator   Example   Same As   Result in x   Try it
=   x = y   x = y   x = 5   Try it »
+=   x += y   x = x + y   x = 15   Try it »
-=   x -= y   x = x - y   x = 5   Try it »
*=   x *= y   x = x * y   x = 50   Try it »
/=   x /= y   x = x / y   x = 2   Try it »
%=   x %= y   x = x % y   x = 0

6
JavaScript Operators / Re: ARITHMETIC OPERATORS
« on: October 18, 2017, 09:45:09 pm »
JavaScript Arithmetic Operators
Arithmetic operators are used to perform arithmetic between variables and/or values.

Given that y = 5, the table below explains the arithmetic operators:

Operator   Description   Example   Result in y   Result in x   Try it
+   Addition   x = y + 2   y = 5   x = 7   Try it »
-   Subtraction   x = y - 2   y = 5   x = 3   Try it »
*   Multiplication   x = y * 2   y = 5   x = 10   Try it »
/   Division   x = y / 2   y = 5   x = 2.5   Try it »
%   Modulus (division remainder)   x = y % 2   y = 5   x = 1   Try it »
++   Increment   x = ++y   y = 6   x = 6   Try it »
x = y++   y = 6   x = 5   Try it »
--   Decrement   x = --y   y = 4   x = 4   Try it »
x = y--   y = 4   x = 5

7
JavaScript Operators / Re: COMPARISON OPERATORS
« on: October 18, 2017, 09:41:29 pm »
Comparison operators are used in logical statements to determine equality or difference between variables or values.

8
JavaScript Operators / Re: BITWISE OPERATORS
« on: October 18, 2017, 09:35:33 pm »
What are the advantages of using bitwise operations?

9
JavaScript Operators / Re: STRING OPERATORS
« on: October 18, 2017, 09:35:13 pm »
What are the advantages of using bitwise operations?

10
JavaScript Operators / Re: STRING OPERATORS
« on: October 18, 2017, 09:32:36 pm »
String literals take the forms:

'string text'
"string text"
"中文 español deutsch English हिन्दी العربية português বাংলা русский 日本語 ਪੰਜਾਬੀ 한국어 தமிழ் עברית"
Strings can also be created using the String global object directly:

String(thing)

11
CSS Fonts, Icons, Links / Re: CSS ICONS
« on: October 18, 2017, 09:27:02 pm »
How To Create a Menu Icon????????????

12
JavaScript Operators / Re: ARITHMETIC OPERATORS
« on: October 18, 2017, 09:19:54 pm »
It already exists; You can use the CSS3 calc() notation:

div {
    background: olive;
    height: 200px;
    width: 200px;
}

div > div {
    background: azure;
    height: calc(100% - 10px);
    width: 100px;
}

Pages: [1]