+ 1
Error when used in different editor
/*when i search for iteration,i found this code and execute it in the editor given on the website. but when i execute it in the editor of sololearn while substituting the 'yuhu' with '00' there is an error. /*Uncaught SyntaxError: Unexpected token class Line: 1 */ /* does this mean different editor has different output?*/ public class Main { public static void main(String[] args) { int i; for (i = 0; i < 5; i++) { if (i >= 2) { break;
12 Answers
+ 14
@Ace sir
thats what i was asking you ... that how he is using java in js
//i started learning javascript after seeing java in it
//see my recent activity 😂🔫
+ 12
no problem ☺
+ 3
I didnt know dat! i feel like an idiot now lol. So i have to learn to use java syntax first?
Thanks for the help @Guarav and @Ace :)
+ 3
yea sorry...im still learning haha.
+ 2
Sorry i forgot about the sharing option :P..here you go
https://code.sololearn.com/WRyeByv6Yz4c
+ 2
so theres no way of iterating in javasyntax? i dont really know how...
+ 1
@ Ragon ...there is iteration in the code above.
+ 1
@Tim_Millar
but thats for javascript, not java syntax or so i was told :)
+ 1
@ Ragon ..... it is java
+ 1
yes @ Ragon
0
okay i'm lost and confused now. Does that mean it works for java syntax...? -(0.0III)-
@Tim
0
But...but i tried and it didnt work. I set the editor to html/css/js and it didnt work for js. @Tim
@Ace which is the right one..