Random Lua Flashcards

(43 cards)

1
Q

What is Luau?

A

A programming language derived from Lua, designed for Roblox game development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or false: Luau is a statically typed language.

A

FALSE

Luau is dynamically typed but supports optional static typing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define Roblox.

A

An online platform that allows users to create and play games created by other users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does JIT stand for in Luau?

A

Just-In-Time, a compilation method that improves performance during execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Fill in the blank: Luau is an extension of ______.

A

Lua

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of type annotations in Luau?

A

To specify the data types of variables, enhancing code clarity and safety.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or false: Luau supports coroutines.

A

TRUE

Coroutines allow for cooperative multitasking in Luau.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a table in Luau?

A

A data structure that can hold multiple values, similar to arrays or dictionaries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define metatables.

A

Tables that define behavior for other tables, enabling operator overloading and inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Roblox API?

A

A set of functions and services that developers use to interact with the Roblox platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Fill in the blank: Luau uses __index for ______.

A

inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a function in Luau?

A

A block of code that performs a specific task and can be reused.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True or false: Luau allows first-class functions.

A

TRUE

Functions can be assigned to variables, passed as arguments, and returned from other functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Roblox Studio?

A

An integrated development environment for creating and managing Roblox games.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define event in Luau.

A

A signal that can be triggered to notify listeners about changes or actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: Local variables are defined with the keyword ______.

A

local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a module script?

A

A script that can be reused across different parts of a Roblox game.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

True or false: Luau supports object-oriented programming.

A

TRUE

Luau allows for creating classes and objects using tables and metatables.

19
Q

What is debugging?

A

The process of identifying and fixing errors or bugs in code.

20
Q

Define scope in programming.

A

The context in which a variable is accessible or defined.

21
Q

Fill in the blank: Luau uses __call for ______.

A

function-like behavior

22
Q

What is a callback function?

A

A function passed as an argument to another function, executed at a later time.

23
Q

True or false: Luau has built-in support for error handling.

A

TRUE

Luau uses pcall and xpcall for error handling.

24
Q

What does yield do in Luau?

A

Pauses the execution of a coroutine, allowing other coroutines to run.

25
Define **closure**.
A function that captures the lexical scope in which it was defined.
26
Fill in the blank: Luau supports **______** programming paradigms.
multiple
27
What is **Roblox Marketplace**?
A platform for buying and selling in-game assets and items.
28
True or false: Luau allows **string interpolation**.
TRUE ## Footnote You can embed variables directly within strings using `${}` syntax.
29
What is the **Luau compiler**?
A tool that translates Luau code into bytecode for execution.
30
Define **instance** in Roblox.
An object created from a class, representing a specific entity in the game.
31
Fill in the blank: **Roblox** uses a **______** engine for rendering.
custom
32
What is a **service** in Roblox?
A special object that provides specific functionality, like data storage or player management.
33
True or false: Luau supports **async programming**.
TRUE ## Footnote Luau allows for asynchronous operations using promises.
34
What is a **data type** in Luau?
A classification of data that determines the type of value a variable can hold.
35
Define **inheritance** in programming.
A mechanism where a new class derives properties and behaviors from an existing class.
36
Fill in the blank: **Roblox** uses **______** for multiplayer functionality.
servers
37
What is a **UI** in Roblox?
User Interface, the visual elements that allow users to interact with the game.
38
True or false: Luau has a **strict mode**.
FALSE ## Footnote Unlike JavaScript, Luau does not have a strict mode feature.
39
What is a **loop** in programming?
A control structure that repeats a block of code multiple times.
40
Define **array** in Luau.
A table with integer keys, used to store a list of values.
41
Fill in the blank: **Roblox** uses **______** for physics simulation.
Bullet
42
What is a **script** in Roblox?
A piece of code written in Luau that controls game behavior.
43
True or false: Luau allows **multiple return values** from functions.
TRUE ## Footnote Functions can return several values, which can be captured in variables.