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.
1
vote
Scale the ingredients of a recipe up/down
I have edited your little code snippet and wrote it in ES6, cause sooner or later you will need it. Most tutorials are written in ES6.
Mostly you will use a build tool like webpack in building react a …
1
vote
Shrinking header on scroll
// init your element
var $nav = $('div.single-level-nav');
// use a boolean var to check if the element is already shrinked
var navShrinked = false;
$(window).on('scroll', function() {
if ($(th …
-1
votes
Get Ajax request implementation without jQuery
Info: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Operators/Spread_operator
ajax, xhr and opts changed from var to const, because theire values never change. …
1
vote
Chaining promises into a callback
This is not perfect and I haven't test it, but you can perfectly use async/await in here.
I think there are too many promise chains in your code and it's hard to understand how it works.
As I said, …
3
votes
Accepted
A clock implemented using Moment.js
DOCTYPE html>
<html>
<head>
<title>Html clock</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"></script>
<script type="text … /javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.5/moment-timezone-with-data.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body …