The second assignment in the following statement sets col2 to the current (updated) col1 value, not the original col1 value. The result is that col1 and col2 have the same value. This behavior differs from standard SQL.UPDATE t1 SET col1 = col1 + 1, col2 = col1;
if (i > 10) {
history.shift();
}
localStorage.removeItem(history[0])
, то это не удаление нулевого элемента массива, хранящегося в localStorage, а удаление из localStorage свойства с именем, соответствующим значению нулевого элемента массива history. <div id="quote_text"></div>
<button id="get_quote">Get quote</button>
const url = 'https://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&jsonp=parseQuote&lang=ru&key=';
document.querySelector('#get_quote').addEventListener('click', function() {
const script = document.createElement('script');
script.src = url + (Math.random() * 10e5 | 0);
document.body.append(script);
});
function parseQuote(data) {
document.querySelector('#quote_text').innerHTML = data.quoteText;
}
В первом случае адреса не равны, почему?
.nav-profile
задать следующее:position: fixed;
right: 0;
display: inline-block;
float: right
и margin-right: 82px
- вырезать. var
alphabet = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя',
randomString = '';
while (randomString.length < 6) {
randomString += alphabet[Math.floor(Math.random() * alphabet.length)];
}
console.log(randomString);
lenght
вместо length
(randomSymbol в результате всегда изначально равен 0).;
после условия в цикле while, что делало цикл бесконечным.$arr = [ 'fbb450', 'fff', 'span2', 'AAAAAAAAA!!!!!' ];
$arrHex = preg_grep('/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/', $arr);
const classes = {
test1: 'div1',
test2: 'div2'
};
container.innerHTML = response.map(n => `<div class="${classes[n.Title]}"></div>`).join('');
$('.typeahead').typeahead({
minLength: 0,
}, {
name: 'stocks',
displayKey: 'company_name',
source: function(q, sync) {
if (q === '') {
sync(stocks.all());
} else {
stocks.search(q, sync);
}
},
}).on('typeahead:selected', function(event, data) {
$('.typeahead').val(data.code);
});
$("body").on("click", "#mobile-menu a", function() { $wrapper.css({overflow:"auto"}); $("body").removeClass( 'js-nav' ); $( "#slide-out-open" ).removeClass('slide-out-close').addClass('slide-out-open'); return false; });
return false
в конце выглядит подозрительным. Что если его вырезать? промисы же сами по себе асинхронны
if (intval($a1) === 14 || intval($a1) === 12) {
echo ' равно <br>';
} else {
echo ' no равно <br>';
}
if (intval($a1) !== 14 && intval($a1) !== 12) {
echo ' no равно <br>';
} else {
echo ' равно <br>';
}
Если такой возможности нет, поделитесь ссылками на хорошие календари.