- The Ruby Workshop
- Akshat Paul Peter Philips Dániel Szabó Cheyne Wallace
- 179字
- 2021-06-11 13:04:41
Summary
In this chapter, we learned about program flow. Program flow is a foundational concept in programming that allows programmers to change execution paths dynamically depending on any number of conditions. A core concept within program flow is understanding the Boolean data type along with its truthy operators, AND (&&) and OR (||).
We learned that Ruby supports different program flow options, such as if and unless, which are logical inverses of each other. The decision to use one or the other depends on the programmer, who should opt for readability and maintainability.
We also learned how to loop and were introduced to Ruby blocks, which are bundles of code that get executed along with each iteration of a loop. Bundling code into reusable chunks is also a foundational concept. Another way to bundle code is by using methods, which we've looked at only briefly so far. In the next chapter, we will go into greater depth about methods by learning how to define them, how to set different types of parameters, and how to return values from them.
- Docker進(jìn)階與實(shí)戰(zhàn)
- C# Programming Cookbook
- Programming ArcGIS 10.1 with Python Cookbook
- Building Cross-Platform Desktop Applications with Electron
- JavaScript+Vue+React全程實(shí)例
- Effective Python Penetration Testing
- 劍指大數(shù)據(jù):企業(yè)級(jí)數(shù)據(jù)倉庫項(xiàng)目實(shí)戰(zhàn)(在線教育版)
- Visual Basic程序設(shè)計(jì)習(xí)題與上機(jī)實(shí)踐
- C++編程兵書
- Visual FoxPro 6.0程序設(shè)計(jì)
- SwiftUI極簡開發(fā)
- Mudbox 2013 Cookbook
- 會(huì)當(dāng)凌絕頂:Java開發(fā)修行實(shí)錄
- 數(shù)據(jù)結(jié)構(gòu):Python語言描述
- PHP Microservices