Arrange the lines of code with the correct indentation to get the correct order of the expressions.
Introduction in websocket
Sending data
Report a typo
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');
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.