This file contains hidden or 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
function strictPrice() { | |
"use strict"; | |
var price = 200; | |
eval('var price = 100'); | |
console.log(price); // prints 200 | |
} | |
function nonStrictPrice() { | |
var price = 200; |
This file contains hidden or 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
function assignStrict() { | |
"use strict"; | |
someValue = 1; // error | |
} | |
function assignWithoutStrict() { | |
someValue = 1; // no errors | |
} | |
assignStrict(); |
This file contains hidden or 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
function newExtraFunction() { | |
"use strict"; | |
} |
This file contains hidden or 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
const url = require('url') | |
module.exports = (config) => { | |
return (req, res, next) => { | |
let current = req.protocol + '//' + req.get('host') + req.originalUrl, | |
withSlash = addSlash(current) | |
if (current == withSlash) { | |
next() |
This file contains hidden or 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
let names = ['John', 'Alice', 'John', 'Jake', 'Jane', 'Jake']; | |
function removeDuplicates(duplicates) { | |
return Array.from(new Set(duplicates)); | |
} | |
names = removeDuplicates(names); | |
console.log(names); //output: ["John", "Alice", "Jake", "Jane"] |
This file contains hidden or 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 auctioner = (function ($) { | |
var module = {}; | |
module.deuterButton = $('.js_sliderDeuteriumMax'); | |
module.deuterInput = $(''); | |
module.submitButton = $('.right_content a.pay'); | |
module.maxAmount = 500000; | |
module.currentAmount = $('.div_trader .currentSum'); | |
module.currentPlayer = $('.div_trader .currentPlayer'); |
This file contains hidden or 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
<!-- // Add this inside html file --> | |
<a href="{{store direct_url='contact-us'}}">Contact Us</a> |
This file contains hidden or 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
let coutries = [ | |
{country: 'France', position: 3}, | |
{country: 'Germany', position: 5}, | |
{country: 'Spain', position: 1}, | |
{country: 'Portugal', position: 4}, | |
{country: 'Italy', position: 2} | |
]; |
This file contains hidden or 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 | |
$productImage = $block->getImage($_product, $image, ['class'=>'float-left']); | |
?> |
This file contains hidden or 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
define([ | |
'jquery', | |
'uiComponent', | |
'ko', | |
'jquery/ui', | |
], function ($, Component, ko) { | |
'use strict'; | |
return Component.extend({ |