I don’t understand, where do we use whitespaces? What is the purpose of it? What would happen if I didn’t use it?
where many languages are using curly brackets:
to determine for example what is nested in the if clause, python uses indent:
# python if True: print "hello world" print "i am outside the if clause"
we can use indent in JS as well, its recommended:
but its only for the sake of readability, the curly brackets determine that
console.log is nested in the if clause
by using indent to determine nesting, you force and enforce readability through indent.
I am just on the part about white space and even after reading your description I don’t understand its purpose. Why do you use curly brackets? what does nested in clause mean?
if consist of a condition and the code within the if block which executes if condition is true. This i name the
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.