Skip to content

Commit b67539e

Browse files
added more explanation regarding dot operator
1 parent 4a031a0 commit b67539e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sprint-1/4-stretch-explore/objects.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,13 @@ console.log prints the value of whatever you ask it to print ie console.log(port
2323

2424
console.assert tests for a condition but only returns a message if the condition is false. For instance it may be used to check the age of a person to restrict access to a site for adults only.
2525

26-
the full stop is used to separate the object from the method. Console is the object and log and assert are methods
26+
the full stop is used to separate an object from its method.
27+
In console.log and console.assert console is the object and log and assert are methods.
28+
The full stop is called the 'dot operator' or 'member access operator'
29+
The dot operator accesses a property or method of an object
30+
For example console.log means access the log method from the console object
31+
and console.assert means access the assert method from the console object
32+
33+
34+
35+

0 commit comments

Comments
 (0)