[−][src]Enum boa::syntax::ast::op::CompOp
A comparison operator compares its operands and returns a logical value based on whether the comparison is true.
The operands can be numerical, string, logical, or object values. Strings are compared based on standard
lexicographical ordering, using Unicode values. In most cases, if the two operands are not of the same type,
JavaScript attempts to convert them to an appropriate type for the comparison. This behavior generally results in
comparing the operands numerically. The sole exceptions to type conversion within comparisons involve the ===
and !==
operators, which perform strict equality and inequality comparisons. These operators do not attempt to convert the operands
to compatible types before checking equality.
More information:
Variants
The equality operator converts the operands if they are not of the same type, then applies strict comparison.
Syntax: y == y
If both operands are objects, then JavaScript compares internal references which are equal when operands refer to the same object in memory.
More information:
The inequality operator returns true
if the operands are not equal.
Syntax: x != y
If the two operands are not of the same type, JavaScript attempts to convert the operands to an appropriate type for the comparison. If both operands are objects, then JavaScript compares internal references which are not equal when operands refer to different objects in memory.
More information:
The identity operator returns true
if the operands are strictly equal with no type
conversion.
Syntax: x === y
Returns true
if the operands are equal and of the same type.
More information:
The non-identity operator returns true
if the operands are not equal and/or not of the
same type.
Syntax: x !== y
Returns true
if the operands are of the same type but not equal, or are of different type.
More information:
The greater than operator returns true
if the left operand is greater than the right
operand.
Syntax: x > y
Returns true
if the left operand is greater than the right operand.
More information:
The greater than or equal operator returns true
if the left operand is greater than or
equal to the right operand.
Syntax: x >= y
Returns true
if the left operand is greater than the right operand.
More information:
The less than operator returns true
if the left operand is less than the right operand.
Syntax: x < y
Returns true
if the left operand is less than the right operand.
More information:
The less than or equal operator returns true
if the left operand is less than or equal to
the right operand.
Syntax: x <= y
Returns true
if the left operand is less than or equal to the right operand.
More information:
The in
operator returns true
if the specified property is in the specified object or
its prototype chain.
Syntax: prop in object
Returns true
the specified property is in the specified object or its prototype chain.
More information:
The instanceof
operator returns true
if the specified object is an instance of the
right hand side object.
Syntax: obj instanceof Object
Returns true
the prototype
property of the right hand side constructor appears anywhere
in the prototype chain of the object.
More information:
Trait Implementations
impl Clone for CompOp
[src]
impl Copy for CompOp
[src]
impl Debug for CompOp
[src]
impl Display for CompOp
[src]
impl Finalize for CompOp
[src]
impl From<CompOp> for BinOp
[src]
impl PartialEq<CompOp> for CompOp
[src]
pub fn eq(&self, other: &CompOp) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for CompOp
[src]
impl Trace for CompOp
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompOp
[src]
impl Send for CompOp
[src]
impl Sync for CompOp
[src]
impl Unpin for CompOp
[src]
impl UnwindSafe for CompOp
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> NativeObject for T where
T: Any + Debug + Trace,
[src]
T: Any + Debug + Trace,
pub fn as_any(&Self) -> &(dyn Any + 'static)
[src]
pub fn as_mut_any(&mut Self) -> &mut (dyn Any + 'static)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,