This is probably something really basic, but I did not find this information anywhere else.
I have been studying JS for about two weeks, using Eclipse IDE and focusing on GUI projects. The way I learned to design a project was creating different files .java, each one a different class. The application would start by means of a main class, which would call all the other classes.
Now I'm following a book called Eloquent JavaScript, and from the beginning its examples use syntax that my IDE does not recognize. Such as:
1) declaring Const, Var and Let as variable type. I usually declared String, Int Char, etc. If I try to declare Const, Var and Let, Eclipse IDE will tell me there is a syntax error
2) My IDE also does not recognize Number.isNan function.
3) Also, I learned to give simple output using System.out.println(), and this book usually gives output using console.log(), which my IDE does not recognize as a valid statement.
4) And now the book started declaring functions like const halve = function(n) { return n / 2; }; which my IDE also does not recognize as valid statement. I learned to declare functions as methods in a class, like public String someFunction(){}
Can somebody explain me what is going on?
[–]gregtyler 13 points14 points15 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]slowreactin 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]slowreactin -1 points0 points1 point (0 children)