An open API service indexing awesome lists of open source software.

https://github.com/shyandsy/learn_lua

learn lua for future
https://github.com/shyandsy/learn_lua

learning lua

Last synced: 9 months ago
JSON representation

learn lua for future

Awesome Lists containing this project

README

          

# Learn Lua
Learn lua for future.

It's my best practice to learn a language by answering the following questions.

Appreciate for Course Codecademy, it helps a lot: [Link](https://www.codecademy.com/courses/learn-lua/lessons/introduction-to-lua/exercises/comments)

## How to learn a language

- how to define variable, local variable, global variable?
- what data types can be use? primitive, complex
- logic control: condition? loop?
- how to define a function
- any object oriented concept? class, overload, override, abstract method
- how to implement some normal data structure, like dynamic array, linked list, map

## case 1
- how to make comment, single line, multiple lines?
- how to define a local variable?
- how to use loop?
- how to print a string without "\n"?

Problem:
Instead of displaying those two lines in the code editor, edit the code so that we output the following pattern in the terminal:
```
1
2 3
4 5 6
7 8 9 10
```

## case 2
- data type: 2D array
- how to use logic control, condition and loop
- how to define function

```

Take a look at the complete alphabet and find your initials.

My initials are B and S, so my initials.lua program should output:

Y Y SSSS
Y Y SS SS
Y Y SS SS
Y Y SS
Y SSSS
Y SS
Y SS SS
Y SS SS
Y SSSS
Copy to Clipboard

Once you are ready, mark this task complete by checking off the box.
```

target: we wanna learn the grammar, so the diagram is not the key point, we dont need exact same here

## case 3
practice data types
- check variable types
- operations on data types