In these exercises you will be given a small program and be asked to identify each piece of syntax with a comment, like this:
// prim SC
'use strict';
// kw id oper prim SC
let color = 'green';
// id D id OP id CP SC
console.log(color);
Here's a shorthand you can use so your comments don't get too long:
- kw: keyword
- id: identifier
- oper: operator
- prim: primitive
- And for the different syntax character:
- D: dot or period -
.
- C: comma -
,
- SC: semicolon -
;
- OP: opening parenthesis -
(
- CP: closing parenthesis -
)
- OC: opening curly bracket -
{
- CC: closing curly bracket -
}
- D: dot or period -