Skip to content

Commit 8fc7030

Browse files
ryanjgillrwaldron
authored andcommitted
Examples: update led-array syntax
1 parent 48f367d commit 8fc7030

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

docs/led-array.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ node eg/led-array.js
3131

3232

3333
```javascript
34-
var five = require("johnny-five");
35-
var board = new five.Board();
34+
const {Board, Leds} = require("johnny-five");
35+
const board = new Board();
3636

3737
board.on("ready", function() {
38-
var array = new five.Leds([3, 5, 6]);
38+
const array = new Leds([3, 5, 6]);
3939

4040
array.pulse();
4141
});
4242

43-
4443
```
4544

4645

eg/led-array.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
var five = require("../lib/johnny-five.js");
2-
var board = new five.Board();
1+
const {Board, Leds} = require("../lib/johnny-five.js");
2+
const board = new Board();
33

44
board.on("ready", function() {
5-
var array = new five.Leds([3, 5, 6]);
5+
const array = new Leds([3, 5, 6]);
66

77
array.pulse();
88
});
9-
109
/* @markdown
1110
1211
Control multiple LEDs at once by creating an LED collection (`Leds`).

0 commit comments

Comments
 (0)