Skip to content

Commit 2514d4b

Browse files
committed
code highlight again and again
1 parent 50df4b2 commit 2514d4b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,21 +1225,21 @@
12251225
12261226
- Constant values
12271227
1228-
If a value is intended to be constant and immutable, it should be given a name in `CONSTANT_VALUE_CASE`. `ALL_CAPS` additionally implies @const (that the value is not overwritable).
1228+
If a value is intended to be constant and immutable, it should be given a name in `CONSTANT_VALUE_CASE`. `ALL_CAPS` additionally implies `@const` (that the value is not overwritable).
12291229

12301230
Primitive types (number, string, boolean) are constant values.
12311231

12321232
Objects' immutabilty is more subjective — objects should be considered immutable only if they do not demonstrate obeserverable state change. This is not enforced by the compiler.
12331233
12341234
- Constant pointers (variables and properties)
12351235
1236-
The @const annotation on a variable or property implies that it is not overwritable. This is enforced by the compiler at build time. This behavior is consistent with the const keyword (which we do not use due to the lack of support in Internet Explorer).
1236+
The `@const` annotation on a variable or property implies that it is not overwritable. This is enforced by the compiler at build time. This behavior is consistent with the const keyword (which we do not use due to the lack of support in Internet Explorer).
12371237
1238-
A @const annotation on a method additionally implies that the method should not be overriden in subclasses.
1238+
A `@const` annotation on a method additionally implies that the method should not be overriden in subclasses.
12391239
12401240
**Examples**
12411241
1242-
Note that @const does not necessarily imply `CONSTANT_VALUES_CASE`. However, `CONSTANT_VALUES_CASE` does imply @const.
1242+
Note that `@const` does not necessarily imply `CONSTANT_VALUES_CASE`. However, `CONSTANT_VALUES_CASE` does imply `@const`.
12431243
12441244
```javascript
12451245
/**
@@ -1249,7 +1249,7 @@
12491249
goog.example.TIMEOUT_IN_MILLISECONDS = 60;
12501250
```
12511251
1252-
The number of seconds in a minute never changes. It is a constant value. `ALL_CAPS` also implies @const, so the constant cannot be overwritten.
1252+
The number of seconds in a minute never changes. It is a constant value. `ALL_CAPS` also implies `@const`, so the constant cannot be overwritten.
12531253
12541254
The open source compiler will allow the symbol it to be overwritten because the constant is not marked as @const.
12551255
@@ -1270,7 +1270,7 @@
12701270
## <a name='accessors'>Accessors</a>
12711271
12721272
- Accessor functions for properties are not required
1273-
- If you do make accessor functions use getVal() and setVal('hello')
1273+
- If you do make accessor functions use `getVal()` and `setVal('hello')`
12741274
12751275
```javascript
12761276
// bad
@@ -1286,7 +1286,7 @@
12861286
dragon.setAge(25);
12871287
```
12881288
1289-
- If the property is a boolean, use isVal() or hasVal()
1289+
- If the property is a boolean, use `isVal()` or `hasVal()`
12901290
12911291
```javascript
12921292
// bad
@@ -1300,7 +1300,7 @@
13001300
}
13011301
```
13021302
1303-
- It's okay to create get() and set() functions, but be consistent.
1303+
- It's okay to create `get()` and `set()` functions, but be consistent.
13041304

13051305
```javascript
13061306
function Jedi(options) {
@@ -1392,7 +1392,7 @@
13921392
13931393
- The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated.
13941394
- The file should be named with camelCase, live in a folder with the same name, and match the name of the single export.
1395-
- Add a method called noConflict() that sets the exported module to the previous version and returns this one.
1395+
- Add a method called `noConflict()` that sets the exported module to the previous version and returns this one.
13961396
- Always declare `'use strict';` at the top of the module.
13971397

13981398
```javascript

0 commit comments

Comments
 (0)