Operator

2025/12/27

Type
Learning Resource
Format
Glossary Article
Version
General
Subject Tags
Code
Assets
All else
Copyright 2016-2026, GDQuest
Created
2026/02/16
Updated
2025/12/27

Operator

In computer programming, an operator is a symbol used to perform an operation on some data. For example, we can use the plus sign (+) to add two values: numbers, vectors, strings, arrays...

Operators are also used for logical operations and to calculate boolean expressions. For example, the greater than sign (>) returns true if the data on the left is greater than the data on the right side of the symbol.

var left := 5
var right := 3
print(left > right) # prints "true"

We also use operators to access data. For example, in GDScript, we use the dot to access properties and methods (member variables and member functions). To access the x position of a node, you would write position.x. The dot operator is used to access the property named x on the node's Vector2 property named position.

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!