Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Comparison Operators | Control Structures
course content

Зміст курсу

Introduction to GoLang

Comparison OperatorsComparison Operators

We discussed three comparison operators in previous chapters. However, there are additional operators in this category that we should be familiar with. Below is a list of all the comparison operators:

OperatorLogic
==Equal to
!=Not Equal to
<Less Than
<=Less Than or Equal to
>Greater Than
>=Greater Than or Equal to

Not Equal To (!=)

This operator is used to check if two values are not equal to each other. For example:

go

index.go

Less Than or Equal To (<=)

This operator is used to check if the value on the left is less than or equal to the value on the right:

go

index.go

Greater Than or Equal To (>=)

This operator is used to check if the value on the left is greater than or equal to the value on the right:

go

index.go

Which of the following is equivalent to the expression a <= 5 ?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 3. Розділ 1
course content

Зміст курсу

Introduction to GoLang

Comparison OperatorsComparison Operators

We discussed three comparison operators in previous chapters. However, there are additional operators in this category that we should be familiar with. Below is a list of all the comparison operators:

OperatorLogic
==Equal to
!=Not Equal to
<Less Than
<=Less Than or Equal to
>Greater Than
>=Greater Than or Equal to

Not Equal To (!=)

This operator is used to check if two values are not equal to each other. For example:

go

index.go

Less Than or Equal To (<=)

This operator is used to check if the value on the left is less than or equal to the value on the right:

go

index.go

Greater Than or Equal To (>=)

This operator is used to check if the value on the left is greater than or equal to the value on the right:

go

index.go

Which of the following is equivalent to the expression a <= 5 ?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 3. Розділ 1
some-alt