function sum(a,b) {
return sumRangeAcc(a,b,0)
}
function sumRangeAcc(a,b,sum) {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('push', function(event) { | |
// Since there is no payload data with the first version | |
// of push messages, we'll grab some data from | |
// an API and use it to populate a notification | |
event.waitUntil( | |
fetch(SOME_API_ENDPOINT).then(function(response) { | |
if (response.status !== 200) { | |
// Either show a message to the user explaining the error | |
// or enter a generic message and handle the | |
// onnotificationclick event to direct the user to a web page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$images = get_field('photos'); | |
if( $images ): ?> | |
<ul class="slide-gallery" id="photoGallery"> | |
<?php foreach( $images as $image ): ?> | |
<li class="gallery-item" data-thumb="<?php echo $image['sizes']['thumbnail']; ?>" data-src="<?php echo $image['url']; ?>"> | |
<img src="<?php echo $image['sizes']['large']; ?>" alt="<?php echo $image['caption']; ?>" /> | |
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function Tabs() { | |
var bindAll = function() { | |
var menuElements = document.querySelectorAll('[data-tab]'); | |
for(var i = 0; i < menuElements.length ; i++) { | |
menuElements[i].addEventListener('click', change, false); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
module.exports = { | |
entry: path.resolve(__dirname, '../src/app.js'), // Точка входа | |
output: { | |
path: path.resolve(__dirname, '../build'), // Точка выхода | |
filename: "bundle.js" | |
} | |
} |