- 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.
推薦閱讀
- 前端跨界開發(fā)指南:JavaScript工具庫原理解析與實(shí)戰(zhàn)
- Raspberry Pi Networking Cookbook(Second Edition)
- C#編程入門指南(上下冊(cè))
- Java技術(shù)手冊(cè)(原書第7版)
- Building a Recommendation Engine with Scala
- Web Application Development with MEAN
- 編譯系統(tǒng)透視:圖解編譯原理
- Python機(jī)器學(xué)習(xí)實(shí)戰(zhàn)
- 人人都懂設(shè)計(jì)模式:從生活中領(lǐng)悟設(shè)計(jì)模式(Python實(shí)現(xiàn))
- Elasticsearch Server(Third Edition)
- 深入RabbitMQ
- Django實(shí)戰(zhàn):Python Web典型模塊與項(xiàng)目開發(fā)
- 貫通Tomcat開發(fā)
- Node.js Web Development
- Scratch編程入門與算法進(jìn)階(第2版)