We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3df344e + f6d11e8 commit 97d6125Copy full SHA for 97d6125
doc/sjs-for-js/index.md
@@ -8,15 +8,15 @@ Below you can see the same functionality implemented in JavaScript ES6 and Scala
8
{% columns %}
9
{% column 6 ES6 %}
10
{% highlight javascript %}
11
-var xhr = new XMLHttpRequest();
+const xhr = new XMLHttpRequest();
12
13
xhr.open("GET",
14
"https://api.twitter.com/1.1/search/" +
15
"tweets.json?q=%23scalajs"
16
);
17
xhr.onload = (e) => {
18
if (xhr.status === 200) {
19
- var r = JSON.parse(xhr.responseText);
+ const r = JSON.parse(xhr.responseText);
20
$("#tweets").html(parseTweets(r));
21
}
22
};
0 commit comments