Key Takeaways

Get a recap of all the concepts learned in this chapter.

We should use const functions regularly when a function doesn’t intend to change the underlying object. Making certain functions const is meaningful because:

  • const functions help the compiler to perform optimization.
  • const functions clarify the intentions of the developer
  • const functions prevent accidental modifications of the underlying object

Get hands-on with 1400+ tech skills courses.