Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
JavaScript is a versatile, high-level programming language. It is the programming language in all browsers.and can be used for back-end programming with node.js. Use this tag for questions regarding vanilla JavaScript; optionally tagged with an ECMAScript version. If you are using a preprocessor such as TypeScript please tag with that too.
4
votes
1
answer
480
views
Ajax for RESTful web service
btoa(authentication.user + ":" + authentication.password)); //btoa() = encode string to base64
}
req.overrideMimeType("text/plain; charset=utf-8"); //The browser must not execute javascript-files …
5
votes
Accepted
Is this a good approach to loading JavaScript files asynchronously?
without the need of an Array anymore:
function loadScript(path, scriptLoadedCallback){
var element=document.createElement('script'); //generate <script>-tag
element.setAttribute("type","text/javascript …
2
votes
1
answer
2k
views
Search for data and order by priority efficiently
I have a search-function, that searches for specific data within a huge Object.
Depending on how good a found entry matches, the finding gets "matchPoints" (or "Priority")
var findings = {};
for(var …
0
votes
1
answer
87
views
Class-Definition Comparison
Whenever I needed something similar like a "Class" in JavaScript, I wrote it like this:
function Point(x, y){
var self = this;
self.x = x;
self.y = y;
self.dist = function(){
return …
13
votes
Accepted
Rock Paper Scissors in JavaScript
use brackets
if ($input.val() === '-1') { return; }
I personally don't mind conditions within one line, but dropping the brackets is bad practice - and can lead to strange behaviours, especially in JavaScript … You should show them jQuery once they know the basic principles of JavaScript. …