This translation is incomplete. Please help translate this article from English.
JavaScript (JS) je programski jezik koji se interpretira ili kompajlira JIT mehanizmom sa ugrađenom podrškom za prvoklasne funkcije. Mada je najpoznatiji kao skript-jezik sa veb stranice, mnoga okruženja koja nisu pretraživači ga takođe koriste, kao što je Node.js, Apache CouchDB i Adobe Acrobat. JavaSkript je dinamički jezik baziran na prototipovima koji podržava više paradigmi, uključujući objektno-orijentisano, imperativno i deklarativno (npr. funkcionalno) programiranje. Pročitajte više o JavaSkriptu.
Ova sekcija sajta je posvećena JavaScript programskom jeziku, ne delovima koji su specifični web stranicama ili drugim hosting sredinama. Za informacije vezane za APIs specifične za web stranice, posetite Web APIs i DOM.
Standard za JavaScript je ECMAScript. Od 2012, svi moderni pretraživači u potpunosti podržavaju ECMAScript 5.1. Stariji pretraživači podržavaju najmanje ECMAScript 3. ECMA International je Juna 17, 2015, objavila šestu verziju ECMAScript-a, Zvanično nazvana ECMAScript 2015, u početku oslovljavana sa ECMAScript 6 ili ES6. Od tada, ECMAScript standardi se objavljuju na godišnjem nivou. Ova dokumentacija se odnosi na poslednju verziju u pripremi, trenutno ECMAScript 2019.
Ne treba poistovetiti JavaScript i Java programski jezik. "Java" i "JavaScript" su zaštitni znak ili registrovani zaštitni znak Oracle-a u SAD i drugim državama. Međutim, ova dva jezika imaju potpuno različitu sintaksu, semantiku i upotrebu.
Tutorials
Learn how to program in JavaScript with guides and tutorials.
For complete beginners
Head over to our Learning Area JavaScript topic if you want to learn JavaScript but have no previous experience of JavaScript or programming. The complete modules available there are as follows:
- JavaScript first steps
- Answers some fundamental questions such as "what is JavaScript?", "what does it look like?", and "what can it do?", along with discussing key JavaScript features such as variables, strings, numbers, and arrays.
- JavaScript building blocks
- Continues our coverage of JavaScript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
JavaScript guide
- JavaScript Guide
- A much more detailed guide to the JavaScript language, aimed at those with previous programming experience either in JavaScript or another language.
Intermediate
- Introducing JavaScript objects
- The object-oriented nature of JavaScript is important to understand if you want to go further with your knowledge of the language and write more efficient code, therefore we've provided this module to help you.
- Client-side web APIs
- When writing client-side JavaScript for web sites or applications, you won't go very far before you start to use APIs — interfaces for manipulating different aspects of the browser and operating system the site is running on, or even data from other web sites or services. In this module we will explore what APIs are, and how to use some of the most common APIs you'll come across often in your development work.
- A re-introduction to JavaScript
- An overview for those who think they know about JavaScript.
- JavaScript data structures
- Overview of available data structures in JavaScript.
- Equality comparisons and sameness
- JavaScript provides three different value-comparison operations: strict equality using
===, loose equality using==, and theObject.is()method.
Advanced
- Inheritance and the prototype chain
- Explanation of the widely misunderstood and under-estimated prototype-based inheritance.
- Strict mode
- Strict mode defines that you can not use any variable before initializing it. It is a restricted variant of ECMAScript 5, for faster performance and easier debugging.
- JavaScript typed arrays
- JavaScript typed arrays provide a mechanism for accessing raw binary data.
- Memory Management
- Memory life cycle and garbage collection in JavaScript.
- Concurrency model and Event Loop
- JavaScript has a concurrency model based on an "event loop".
Reference
Browse the complete JavaScript reference documentation.
- Standard objects
- Get to know standard built-in objects
Array,Boolean,Date,Error,Function,JSON,Math,Number,Object,RegExp,String,Map,Set,WeakMap,WeakSet, and others. - Expressions and operators
- Learn more about the behavior of JavaScript's operators
instanceof,typeof,new,this, the operator precedence, and more. - Statements and declarations
- Learn how
do-while,for-in,for-of,try-catch,let,var,const,if-else,switch, and more JavaScript statements and keywords work. - Functions
- Learn how to work with JavaScript's functions to develop your applications.
Tools & resources
Helpful tools for writing and debugging your JavaScript code.
- Firefox Developer Tools
- Scratchpad, Web Console, JavaScript Profiler, Debugger, and more.
- JavaScript Shells
- A JavaScript shell allows you to quickly test snippets of JavaScript code.
- TogetherJS
- Collaboration made easy. By adding TogetherJS to your site, your users can help each other out on a website in real time!
- Stack Overflow
- Stack Overflow questions tagged with "JavaScript".
- JavaScript versions and release notes
- Browse JavaScript's feature history and implementation status.
- JSFiddle
- Edit JavaScript, CSS, HTML and get live results. Use external resources and collaborate with your team online.
- Plunker
- Plunker is an online community for creating, collaborating on and sharing your web development ideas. Edit your JavaScript, CSS, HTML files and get live results and file structure.
Join the JavaScript community
- IRC: #js (learn more)
- ES discuss: esdiscuss.org
- SpiderMonkey: Project page
- Twitter: @SpiderMonkeyJS