+ 1
ECMAScript 6 Rest & Spread
Hello everyone, the test code in this part of course, seems not working with playground ?? it's a compatibility problem with ES6? I don't really understand this way of doing things and I think I will never use it. const obj1 = { foo: 'bar', x: 42 }; const obj2 = { foo: 'baz', y: 5 }; const clonedObj = { ...obj1 }; // { foo: "bar", x: 42 } const mergedObj = { ...obj1, ...obj2 }; // { foo: "baz", x: 42, y: 5 }
9 Respostas
+ 2
How do you know the code is not working with playground? Show your not working playground by sharing it.
If your playground is really not working with es6, that's because of your phone webview can't support it, it's not playground problem, please update your webview from your phone.
+ 2
Emmanuel Omolewu Alain Mazy Try to use babel to precompile your code.
You can erase my vode put your es6 code to this template.
Just don't erase the starting comment:
//</script><script type="text/babel">
https://code.sololearn.com/WVZ7dAJQN7kW/?ref=app
+ 2
Calviղ thanks alot sir. It works
+ 2
SoloLearn compiles Web Code using client's device.
0
Calviղ mine seems not compatible with ES6 it shows synthax error for every example of try it yourself
0
Calviղ I understand that babel is a transpiler, does this imply that Sololearn playground runs on ecma2015
0
Emmanuel Omolewu Babel transpiler takes the ES6 source code we write and produce ES5 code that old browsers can interpret more consistently.
0
Gordon Wow, dat answers it
0
II don't learn on phone, but on pc.
I am using sololearn playground.
After that, that's okay, I moved on, other lessons .. if it turns out that one day I need that, I will come back to it, but that would surprise me all the same; )