What is Java Script Wikipedia Java Script is
- Slides: 10
What is Java Script Wikipedia Java. Script is a high level dynamic, untyped and interpreted programming language standardized in the ECMA Script language specification, that alongside HTML and CSS is one of the three core technologies of world wide web content
History of Java. Script • Java. Script was created by Brendan Eich in 1995 during his time at Netscape Communications. It was inspired by Java, Scheme and Self • It was originally called Mocha, then renamed to Live. Scripts and finally to Java. Scripts when Netscape and Sun Microsystems did a licensing agreement that included the language. • The idea at the time was to make a scripting language complementary to Java and cash in on Java's popularity. • The goal was that higher-end programmers used Java and Java. Script was created to fill the need for a “glue language” used by informal programmers and designers.
Java. Script and Java • Even though the names of these languages share the term Java, they're not really closely related. They share C-style syntax but otherwise have very different purposes and very different principles • Both Java and Java. Script are broadly portable, Java through its JVMs and Java. Script through broad implementation of the language in various browsers and other runtimes • Java is compiled to bytecode, whereas Java. Script is not compiled at all, it's interpreted at runtime • Java. Script is the dominant programming language in web browsers. To run Java code in a web browser, you would need an additional plugin. In Java, you can call native functions through the JNI interface. But Java. Script, at least when executed within a web browser, runs in a security sandbox that doesn't allow it access to local resources
Tools needed • Code Editor • Browser with developer tools • Helper tools for debugging etc
Browser Console: A JS Playground • The browser is the natural environment for Java. Script and modern browsers ship with development tools built right in to work with Java. Script for logging, testing, debugging, and more. • Knowing how to use these development tools will make working with Java. Script much easier and more interesting. • Open by clicking Ctrl+Shift+I on the webpage or right click and select inspect
Inline JS /JS as an external File • Inline Js is suitable for smaller script files • JS referenced as an external file is a better approach as it allows for modularity and separation of interactive logic from Content
How to write good Java. Script • • • JS is Case Sensitive Use Camel. Case Naming Convention which means we can concatenate words, and separate them by capitalizing the first letter of each word JS doesnot care about white spaces but they make the code human readable End each statement with a semicolon Use Comments
What can Java. Script Do • • It can change HTML content, atributes It can change CSS style It can hide and show HTML elements It can access the Dom and manipulate its objects It can work with forms It can manipulate HTML objects It can react to events It can access and manipulate Browser objects
Current Landscape • Confirms to ever evolving ECMAScript Standard • ECMAScript 2015: The current specification Also known as ES 6 • Browser use ECMAScript to interpret JS ECMAScript • Abstractions like Jquery, Kube etc which make it easy to use JS in websites • Frameworks: Angular, React, Vue. Used to make single page websites. Very popular • Node: Server side scripting
Learning Sources • • • MDN's Java. Script reference W 3 Schools Courses on Udemy, Udacity, Course. Era Khan Academy Learning platform by Linked. In