How do I implement the foreach iteration?
I use the following code but unfortunately doesnt work, any ideas?
<code> // Gets a list of all clients and sends them a message
var backend = require('backend');
var clients = backend.getClients();
clients.forEach(function(client) {
client.chat('Hello ', + client.Name() + '. I'm a SinusBot!');
});
</code>
I use the following code but unfortunately doesnt work, any ideas?
<code> // Gets a list of all clients and sends them a message
var backend = require('backend');
var clients = backend.getClients();
clients.forEach(function(client) {
client.chat('Hello ', + client.Name() + '. I'm a SinusBot!');
});
</code>