Sending data

Report a typo

Arrange the lines of code with the correct indentation to get the correct order of the expressions.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                socket.send(body);
              
                let body = {id: 66, text: 'Hello world!'};
              
                body = JSON.stringify(body);
              
                const socket = new WebSocket('ws//:address/endpoint');
              
___

Create a free account to access the full topic