Type Coercion in Lua, Concatenation and Arithmetic Operations in Lua Programming, Codecademy Coding

Welcome back to another Lua coding lesson dealing with the variable section, this is, Type Coercion in Lua, Concatenation and Arithmetic Operations in Lua Programming, Codecademy Coding. In this lesson we continue taking a look at Codecademy’s Learn Lua course, variable section, lesson named “Type Coercion in Concatenation and Arithmetic Operations” and we learn more about what type coercion means in programming. We learn that when there are numbers involved and we use the “+” addition operator, if the number is a string, it will be coerced into a number when using the addition operator (+). But instead, when dealing with numbers, and there is a string, if we use the concatenation operator (..) then it will convert a number into a string. Type coercion is the conversion of a value from one type of data, to another data type. Lua automatically converts a string to a number, or a number to a string when done correctly. Learning Lua type coercion will help make you a more savvy programmer in 2023 and beyond. Make sure to practice Lua programming and become the best by constantly practicing programming. Thanks for watching Type Coercion in Lua, Concatenation and Arithmetic Operations in Lua Programming, Codecademy Coding.