I'd Blush if I Could: closing gender divides in digital skills through education A report by the EQUALS Skills Coalition This report analyses the gender gap in ICT skills and the feminization of digital voice assistants, explores the inverse correlation between gender equality and technological skills and education around the world, and provides recommendations for policy-makers and practitioners. Towards an equal future: Reimagining girls' education through STEM A report by UNICEF, ITU and EQUALS Marking the 25th anniversary of the Beijing Declaration and Platform for Action, this report calls attention to the potential of STEM education to transform gender norms in education, to improve quality learning opportunities for girls, and to highlight key actions to accelerate girls.
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
Field Summary
Fields
Modifier and Type Field and Description int
x
int
y
The Y coordinate of thisPoint
.
Constructor Summary
Constructors
Constructor and Description Point()
Constructs and initializes a point at the origin (0, 0) of the coordinate space.Point(int x, int y)
Constructs and initializes a point at the specified(x,y)
location in the coordinate space.Point(Point p)
Constructs and initializes a point with the same location as the specifiedPoint
object.
Method Summary
Methods
Modifier and Type Method and Description boolean
equals(Object obj)
Point
getLocation()
Returns the location of this point.double
getX()
Returns the X coordinate of thisPoint2D
indouble
precision.double
getY()
Returns the Y coordinate of thisPoint2D
indouble
precision.void
move(int x, int y)
Moves this point to the specified location in the(x,y)
coordinate plane.void
setLocation(double x, double y)
Sets the location of this point to the specified double coordinates.void
setLocation(int x, int y)
void
setLocation(Point p)
Sets the location of the point to the specified location.String
toString()
Returns a string representation of this point and its location in the(x,y)
coordinate space.void
translate(int dx, int dy)
Translates this point, at location(x,y)
, bydx
along thex
axis anddy
along they
axis so that it now represents the point(x+dx,y+dy)
.Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Comparison and Logical operators are used to test for true
or false
.
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 | Try it |
---|---|---|---|---|
equal to | x 8 | false | Try it » | |
x 5 | true | Try it » | ||
x '5' | true | Try it » | ||
equal value and equal type | x 5 | true | Try it » | |
x '5' | false | Try it » | ||
!= | not equal | x != 8 | true | Try it » |
! | not equal value or not equal type | x ! 5 | false | Try it » |
x ! '5' | true | Try it » | ||
x ! 8 | true | Try it » | ||
> | greater than | x > 8 | false | Try it » |
< | less than | x < 8 | true | Try it » |
>= | greater than or equal to | x >= 8 | false | Try it » |
<= | less than or equal to | x <= 8 | true | Try it » |
How Can it be Used
Comparison operators can be used in conditional statements to compare values and take action depending on the result: Any video converter pro 7 2 09.
You will learn more about the use of conditional statements in the next chapter of this tutorial.
Logical Operators
Logical operators are used to determine the logic between variables or values. Scrutiny 6 8 18 – suite of web optimization tools.
Given that x = 6
and y = 3
, the table below explains the logical operators:
Windocd 1 6 Equals 2/3
Operator | Description | Example | Try it |
---|---|---|---|
&& | and | (x < 10 && y > 1) is true | Try it » |
|| | or | (x 5 || y 5) is false | Try it » |
! | not | !(x y) is true | Try it » |
Conditional (Ternary) Operator
JavaScript also contains a conditional operator that assigns a value to a variable based on some condition.
Syntax
Example
If the variable age is a value below 18, the value of the variable voteable will be 'Too young', otherwise the value of voteable will be 'Old enough'.
Comparing Different Types
Comparing data of different types may give unexpected results.
When comparing a string with a number, JavaScript will convert the string to a number when doing the comparison. An empty string converts to 0. A non-numeric string converts to NaN
which is always false
.
Case | Value | Try |
---|---|---|
2 < 12 | true | Try it » |
2 < '12' | true | Try it » |
2 < 'John' | false | Try it » |
2 > 'John' | false | Try it » |
2 'John' | false | Try it » |
'2' < '12' | false | Try it » |
'2' > '12' | true | Try it » |
'2' '12' | false | Try it » |
When comparing two strings, '2' will be greater than '12', because (alphabetically) 1 is less than 2.
To secure a proper result, variables should be converted to the proper type before comparison:
if (isNaN(age)) {
voteable = 'Input is not a number';
} else {
voteable = (age < 18) ? 'Too young' : 'Old enough';
}