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 |
This tag exists for historical reasons. New challenges of the type previously posted under this tag are not welcome.
1
vote
Program that adds all natural numbers and yields -1/12
JavaScript (ECMAScript 6)
result = 0;
counter = 1;
one = 1;
add=(function(reѕult,counter){
one = ~1*~1 // Minus one times minus one
*(-~1^1) // times min …
70
votes
Write a program that makes 2 + 2 = 5
JavaScript
function addDecibels(){return (10*Math.log10([].reduce.call(arguments,(p,c)=>p+Math.pow(10,c/10),0))).toFixed(1);}
alert( addDecibels(2,2) );
You can see it on a different calculator her …