class Flight extends Component {
getWeekDay = (date) => {
//..
}
// ....
}
const newDate = new Date (year, month, day, );
const monthName = ["дек", "янв", "фев", "мар", "апр", "мая", "июня", "июля", "авг", "сент", "окт", "ноя", "дек"];
const newMonth = monthName[newDate.getMonth()];
const newDate = new Date(year, month - 1, day)
const getStopsNumber = (stop) =>{
switch (stop) {
case 3:
return "3 пересадки"
case 2:
return "2 пересадки"
case 1:
return "1 пересадка"
case 0:
return "без пересадок"
default:
return // это не нужно делать, писать return. Если вы удалите эту (и строку выше), то результат будет такой же - undefined
}
}
<input onClick={() => this.props.stopsClick("allStops")} />
<input onClick={() => this.props.stopsClick("noStops")} />
if( this.state.stops.allStops === false && this.state.stops.noStops === true && this.state.stops.oneStop === true && this.state.stops.twoStop === true && this.state.stops.threeStop === true ){
newStops = {...this.state.stops, allStops: true}
}
width = xEnd - xStart;
height = yEnd - yStart;
const PATHS = new function () {
this.src = 'src';
this.srcAssets = this.src + '/assets';
}
const PATHS = (function () {
const basePath = 'src';
return {
src: basePath,
srcAssets: basePath + '/assets',
};
})();
export default {
name: "profile-account",
props: [
'url',
'amount'
],
mounted() {
},
data() {
return {
balance: this.amount,
isOpen: false
}
},
methods: {
showAddfunds: function(){
this.isOpen = !this.isOpen
console.log(this.isOpen)
}
}
}
class OptionItem {
constructor(id, label) {
this.id = id;
this.label = label;
this.value = id;
}
}
...
const optionObject = new OptionItem(packData.id, packData.title);
[data-num="0"] {
display: none;
}
$('.classDiv').each(function() {
var $this = $(this);
if ($this.text().trim() === '0') {
$this.hide();
}
});
function outCity(CityList) {
console.warn(CityList);
....
}
section.values()
if (CityList.country == section.values()){