Two ways of reading code
code
Interactive guide ___
start_
You can read this piece of code in two different ways:
Reading the logic
In this case, use mostly English words, ignore most of the symbols. You can even swap the order of terms. For example: If the X coordinate is less than the width of the box, then log inside. Otherwise, put an alert saying “error”.
Use it when you're helping somebody write this code.
Reading the syntax, indentation, and symbols
In that case, be careful and include every single symbol. For instance: If, open parenthesis, coordinate dot x, less or equal than, box dot width, close parenthesis, open curly bracket. Indent, console dot log, open parenthesis, open quote, inside, end quote, end parenthesis, end curly bracket. Else, open curly bracket, alert open parenthesis, open quote, error, end quote, end parenthesis, end curly bracket.
info
BIG DATA GUIDE
Lina López
Created on July 22, 2022
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Basic Interactive Microsite
View
3D Corporate Reporting
View
Microsite Vibrant Travel Guide
View
Tourism Guide Microsite
View
Online Product Catalog
View
Vintage Advent Calendar
View
Professional Advent Calendar
Explore all templates
Transcript
Two ways of reading code
code
Interactive guide ___
start_
You can read this piece of code in two different ways:
Reading the logic
In this case, use mostly English words, ignore most of the symbols. You can even swap the order of terms. For example: If the X coordinate is less than the width of the box, then log inside. Otherwise, put an alert saying “error”.
Use it when you're helping somebody write this code.
Reading the syntax, indentation, and symbols
In that case, be careful and include every single symbol. For instance: If, open parenthesis, coordinate dot x, less or equal than, box dot width, close parenthesis, open curly bracket. Indent, console dot log, open parenthesis, open quote, inside, end quote, end parenthesis, end curly bracket. Else, open curly bracket, alert open parenthesis, open quote, error, end quote, end parenthesis, end curly bracket.
info