+ 3

Doesn't sololearn's code playground support for of and for in

I'm a beginner I was working on an average function and another

25th Jul 2020, 10:47 PM
Aroyehun Ahmad Nasreddeen
Aroyehun Ahmad Nasreddeen - avatar
8 odpowiedzi
+ 7
It's not about the Code Playground actually, it's whether the web browser, or (in Android O/S) the Android WebView supports ES syntaxes. Can you share a link to your code in your question Description? it would help others to inspect in case there was a problem. Follow the below guide in case you didn't know how 👇 https://www.sololearn.com/post/75089/?ref=app
25th Jul 2020, 10:57 PM
Ipang
+ 4
A pangram needs to contain each letter of an alphabet at least once. The code: if (cased.indexOf(x) == -1) { console.log(false); return; } You are using the method indexOf(). You call methods/functions with parentheses not square brackets. Break out of the loop (and the function) if a letter was not found using the return statement.
26th Jul 2020, 4:36 AM
Kurt Sicht
Kurt Sicht - avatar
+ 1
Aroyehun Ahmad Nasreddeen I have no problem running your code in Code Playground. But I think something's not right in the code. IIRC panagram is a word witth unique characters, the code says panagram for the test word which contains duplicate character. (Edit) I misunderstood pangram for isogram (sorry)
26th Jul 2020, 3:49 AM
Ipang
0
Ipang that's it thanks
25th Jul 2020, 11:14 PM
Aroyehun Ahmad Nasreddeen
Aroyehun Ahmad Nasreddeen - avatar
26th Jul 2020, 1:55 PM
Aroyehun Ahmad Nasreddeen
Aroyehun Ahmad Nasreddeen - avatar
0
The input is supposed to be an array instead of a string. @klaz baba Thanks to you all for the help
26th Jul 2020, 1:56 PM
Aroyehun Ahmad Nasreddeen
Aroyehun Ahmad Nasreddeen - avatar
0
And the error in the isPangram is that I used square brackets instead of ordinary parentheses
26th Jul 2020, 1:58 PM
Aroyehun Ahmad Nasreddeen
Aroyehun Ahmad Nasreddeen - avatar