回答編集履歴

2

ソース:javascript:アロー関数を削除2

2018/08/23 06:24

投稿

_lemon2003_
_lemon2003_

スコア274

test CHANGED
@@ -64,27 +64,27 @@
64
64
 
65
65
 
66
66
 
67
- Promise.resolve().then(()=>{
67
+ Promise.resolve().then(function(){
68
68
 
69
69
  return async_process(10);
70
70
 
71
- }).then(()=>{
71
+ }).then(function(){
72
72
 
73
73
  updateGauge(10);
74
74
 
75
- }).then(()=>{
75
+ }).then(function(){
76
76
 
77
77
  return async_process(20);
78
78
 
79
- }).then(()=>{
79
+ }).then(function(){
80
80
 
81
81
  updateGauge(20);
82
82
 
83
- }).then(()=>{
83
+ }).then(function(){
84
84
 
85
85
  return async_process(100);
86
86
 
87
- }).then(()=>{
87
+ }).then(function(){
88
88
 
89
89
  updateGauge(100);
90
90
 
@@ -108,4 +108,6 @@
108
108
 
109
109
  </html>
110
110
 
111
+
112
+
111
113
  ```

1

ソース:javascript:アロー関数を削除

2018/08/23 06:24

投稿

_lemon2003_
_lemon2003_

スコア274

test CHANGED
@@ -42,9 +42,9 @@
42
42
 
43
43
  function async_process(percentage){
44
44
 
45
- return new Promise((resolve, reject)=>{
45
+ return new Promise(function(resolve, reject){
46
46
 
47
- setTimeout(()=>{
47
+ setTimeout(function(){
48
48
 
49
49
  console.log("ok " + percentage + "%");
50
50