- Lua Quick Start Guide
- Gabor Szauer
- 108字
- 2021-08-05 10:30:35
Creating variables
To create a variable, you need to do two things:
- Declare the variable
- Assign a value (data) to the variable
As an example, let's make a variable, foo, and assign it the value bar. The code to do this would be:
foo = "bar"
That single line of code declares a variable and assigns a string value to the variable. If you break it into several parts, the actual line of code consists of the following pieces:

Why are there quote marks around bar? What is a string value? These questions will be answered in the coming two sections, Basic types and S tring types.
推薦閱讀
- JavaScript+jQuery開發(fā)實(shí)戰(zhàn)
- YARN Essentials
- C++程序設(shè)計(jì)基礎(chǔ)教程
- Java EE 7 Development with NetBeans 8
- Linux Device Drivers Development
- NetBeans IDE 8 Cookbook
- Mastering Unity 2D Game Development(Second Edition)
- The Professional ScrumMaster’s Handbook
- JavaScript應(yīng)用開發(fā)實(shí)踐指南
- 軟件體系結(jié)構(gòu)
- Python數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南(全彩)
- Practical GIS
- 詩(shī)意的邊緣
- Learning Google Apps Script
- Swift語(yǔ)言實(shí)戰(zhàn)晉級(jí)(第2版)