const items = Array.from(
document.getElementsByClassName('cartitem'),
({textContent}) => ({name: textContent})
);
const itemsJSON = JSON.stringify(items);
var keys = Object.getOwnPropertyNames(obj.position);
keys.sort((a, b) => obj.position[a] - obj.position[b]);
if('discount' in data && parseInt(data.discount) < 0) {
//...
} else if(data.hit === 'hit') {
//...
}
$http.get('js/questions-content.json').success(function(response) {
return response.data;
// console.log(response.data);
});
$http.get('js/questions-content.json').success(function(response) {
$scope.questions = response.data;
});