diff --git a/en/application-dev/reference/apis/js-apis-hilog.md b/en/application-dev/reference/apis/js-apis-hilog.md index 107d3419b8a8b2840d54b90c5e239ea2fea85ac3..4d45271a8791a8370ed4950c75ac96c0fb408b8c 100644 --- a/en/application-dev/reference/apis/js-apis-hilog.md +++ b/en/application-dev/reference/apis/js-apis-hilog.md @@ -1,7 +1,6 @@ # HiLog The HiLog subsystem allows your applications or services to output logs based on the specified type, level, and format string. Such logs help you learn the running status of applications and better debug programs. -This document describes only API functions. For details about log printing requirements, see [Logging Guide](../../../contribute/OpenHarmony-Log-guide.md). > **NOTE**
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. diff --git a/en/application-dev/reference/apis/js-apis-radio.md b/en/application-dev/reference/apis/js-apis-radio.md index 4df1f4e33d37e28fc1ea83d7fde57d32c21df143..86d29eebedf8fb206589a7770a92362a79873c69 100644 --- a/en/application-dev/reference/apis/js-apis-radio.md +++ b/en/application-dev/reference/apis/js-apis-radio.md @@ -408,7 +408,7 @@ Checks whether the current device supports 5G \(NR\). ```js let slotId = 0; let result = radio.isNrSupported(slotId); -console.log(result); +console.log("Result: "+ result); ``` diff --git a/en/application-dev/reference/apis/js-apis-sim.md b/en/application-dev/reference/apis/js-apis-sim.md index f1f20e8d810c3f3fa648e680d494199e30bc1dfe..3344e47d14f8d615b1f81e75f92251dc4e8c8287 100644 --- a/en/application-dev/reference/apis/js-apis-sim.md +++ b/en/application-dev/reference/apis/js-apis-sim.md @@ -521,7 +521,7 @@ Obtains the number of card slots. **Example** ```js -console.log(sim.getMaxSimCount()) +console.log("Result: "+ sim.getMaxSimCount()) ``` diff --git a/en/application-dev/reference/apis/js-apis-webSocket.md b/en/application-dev/reference/apis/js-apis-webSocket.md index edf6be53ac623c5fa4a8f1542bf7222dc42e713c..52f5367110bc35c33075ed291a796a657a468816 100644 --- a/en/application-dev/reference/apis/js-apis-webSocket.md +++ b/en/application-dev/reference/apis/js-apis-webSocket.md @@ -23,7 +23,7 @@ import webSocket from '@ohos.net.webSocket'; var defaultIpAddress = "ws://"; let ws = webSocket.createWebSocket(); ws.on('open', (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); // When receiving the on('open') event, the client can use the send() API to communicate with the server. ws.send("Hello, server!", (err, value) => { if (!err) { @@ -47,7 +47,7 @@ ws.on('message', (err, value) => { } }); ws.on('close', (err, value) => { - console.log("on close, code is " + value.code + ", reason is " + value.reason); + console.log("on close, code is " + value['code'] + ", reason is " + value['reason']); }); ws.on('error', (err) => { console.log("on error, error:" + JSON.stringify(err)); @@ -393,7 +393,7 @@ Enables listening for the **open** events of a WebSocket connection. This API us ```js let ws = webSocket.createWebSocket(); ws.on('open', (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); }); ``` @@ -421,7 +421,7 @@ Disables listening for the **open** events of a WebSocket connection. This API u ```js let ws = webSocket.createWebSocket(); let callback1 = (err, value) => { - console.log("on open, status:" + value.status + ", message:" + value.message); + console.log("on open, status:" + value['status'] + ", message:" + value['message']); } ws.on('open', callback1); // You can pass the callback of the on function to cancel listening for a certain type of callback. If you do not pass the callback, you will cancel listening for all callbacks. @@ -505,7 +505,7 @@ Enables listening for the **close** events of a WebSocket connection. This API u ```js let ws = webSocket.createWebSocket(); ws.on('close', (err, value) => { - console.log("on close, code is " + value.code + ", reason is " + value.reason); + console.log("on close, code is " + value['code'] + ", reason is " + value['reason']); }); ```