I am reading a book (JavaScript:The Definitive Guide) related to JavaScript, and it had three sections as
"Client-Side JavaScript",
"Server-side JavaScript"
"CoreJavaScript"
It fails to explain the difference or I could not find it. Can someone please explain the below:
Are they differ in anything other than the usage ? or Does the syntax and definitions also differ?
Also as discussing about the book, I started learning JavaScript with this book ( JavaScript:The Definitive Guide), Next I will move on to 'JavaScript:The Good Parts by Douglas, and then I will try to inspect code of some real websites. Please let me know if I am going in right path to master this language?
Are they differ in anything other than the usage ? or Does the syntax and definitions also differ?
The language is the same. The environment is different.
By "Core JavaScript," Flanagan is talking about the language and only the objects and functions defined by the ECMAScript specification, leaving anything provided by the environment out.
By "Client-side JavaScript" he's talking about the use of JavaScript, the language, in a browser environemnt. In a browser environment, your code will have access to things provided by the browser, like the document object for the current page, the window, functions like alert that pop up a message, etc.
By "Server-side JavaScript" he's talking about the use of JavaScript, the language, in a server environment. In that environment, your code won't have access to browser-related things because, well, it's not in a browser. It'll probably have access to other things, like APIs for dealing with the file system, databases, network, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With