Click here to Skip to main content
15,899,005 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionUpdate Google chart with dynamic data. Pin
Gopi24718-Jul-18 3:48
Gopi24718-Jul-18 3:48 
AnswerRe: Update Google chart with dynamic data. Pin
ZurdoDev7-Aug-18 4:47
professionalZurdoDev7-Aug-18 4:47 
QuestionIssue With JavaScript and ClearScript Pin
Alan Burkhart13-Jul-18 13:10
Alan Burkhart13-Jul-18 13:10 
AnswerRe: Issue With JavaScript and ClearScript Pin
Graham Breach14-Jul-18 2:07
Graham Breach14-Jul-18 2:07 
GeneralRe: Issue With JavaScript and ClearScript Pin
Alan Burkhart14-Jul-18 3:49
Alan Burkhart14-Jul-18 3:49 
QuestionJavaScript Pin
Member 99702028-Jul-18 20:15
Member 99702028-Jul-18 20:15 
AnswerRe: JavaScript Pin
Member 997020210-Jul-18 4:44
Member 997020210-Jul-18 4:44 
QuestionNeed some help with app, please. Pin
Member 1388357522-Jun-18 12:03
Member 1388357522-Jun-18 12:03 
Application overview: Personal expenses management application that allows users to track how much money have they spent.
[MAJOR] Requirements:
As a result of test problem solution you should provide a command-line application that supports following commands:
● add 2017-04-25 12 USD Jogurt — adds expense entry to the list of user expenses.
Expenses for various dates could be added in any order.
Command accepts following parameters:
2017-04-25 — is the date when expense occurred
12is an amount of money spent
USD — the currency in which expense occurred
Jogurt — is the name of product purchased
● list — shows the list of all expenses sorted by date
● clear 2017-04-25 — removes all expenses for specified date, where:
2017-04-25 — is the date for which all expenses should be removed
● total PLN — this command should take a list of exchange rates from http://fixer.io , calculate the total amount of money spent and present it to user in specified currency, where:
PLN — is the currency in which total amount of expenses should be presented

[MINOR] Requirements: In order to get extra points for test problem solution you might cover your source code with unit tests.
Application usage example: Here is an example of normal application usage flow, for each command a corresponding output is shown:

add 2017-04-25 2 USD Jogurt
2017-04-25
Jogurt 2 USD
add 2017-04-25 3 EUR "French fries"
2017-04-25
Jogurt 2 USD
French Fries 3 EUR
add 2017-04-27 4.75 EUR Beer
2017-04-25
Jogurt 2 USD
French Fries 3 EUR
2017-04-27
Beer 4.75 EUR
add 2017-04-26 2.5 PLN Sweets
2017-04-25
Jogurt 2 USD
French Fries 3 EUR
2017-04-26
Sweets 2.5 PLN
2017-04-27
Beer 4.75 EUR
list
2017-04-25
Jogurt 2 USD
French Fries 3 EUR
2017-04-26
Sweets 2.5 PLN
2017-04-27
Beer 4.75 EUR
clear 2017-04-27
2017-04-25
Jogurt 2 USD
French Fries 3 EUR
2017-04-26
Sweets 2.5 PLN
total EUR
5.42 EUR

I’ve tried to do it like this, but i don’t know what to do next.

<pre lang="Javascript"><pre><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript"><pre lang="Javascript">
class List { constructor(date, amount, currency, product)
{
this._date = date;
this._amount = amount;
this._currency = currency;
this._product = product;
}

get data (){
return this._data;
}

get amount(){
return this._amount;
}

get currency (){
return this._currency;
}

get product (){
return this._product
}
}

class Result extends List {
constructor(date, amount, currency, product) {
super(date);
this._amount = amount;
this._currency = currency;
this._product = product;

} }

const out = new Result(2017-04-25, 12, 'USD', 'Jogurt');
console.log(Result);
AnswerRe: Need some help with app, please. Pin
Nathan Minier25-Jun-18 1:49
professionalNathan Minier25-Jun-18 1:49 
QuestionCreating hexbins visualisation with mapbox in an angular 4 project Pin
Member 1387271014-Jun-18 2:35
Member 1387271014-Jun-18 2:35 
QuestionJavascript function - onclick problem Pin
Member 201089711-Jun-18 16:23
Member 201089711-Jun-18 16:23 
AnswerRe: Javascript function - onclick problem Pin
Member 1387615717-Jun-18 19:57
Member 1387615717-Jun-18 19:57 
GeneralRe: Javascript function - onclick problem Pin
Richard MacCutchan17-Jun-18 21:49
mveRichard MacCutchan17-Jun-18 21:49 
Questionnot work onClick operation Pin
Member 1382834015-May-18 6:29
Member 1382834015-May-18 6:29 
SuggestionRe: not work onClick operation Pin
Richard Deeming15-May-18 9:10
mveRichard Deeming15-May-18 9:10 
GeneralRe: not work onClick operation Pin
Shivnandan singh25-May-18 0:31
Shivnandan singh25-May-18 0:31 
AnswerRe: not work onClick operation Pin
Shivnandan singh25-May-18 0:32
Shivnandan singh25-May-18 0:32 
GeneralCall jquery function after partial view page return. Pin
Rahulgupta.hanu14-May-18 3:28
Rahulgupta.hanu14-May-18 3:28 
GeneralRe: Call jquery function after partial view page return. Pin
CP_Member88829-Jul-18 19:32
CP_Member88829-Jul-18 19:32 
QuestionJava script and SQL Pin
Johannes Moolman7-May-18 23:04
Johannes Moolman7-May-18 23:04 
AnswerRe: Java script and SQL Pin
W Balboos, GHB9-May-18 8:54
W Balboos, GHB9-May-18 8:54 
QuestionMVVM knockoutjs Grid Pin
padav146-May-18 0:01
padav146-May-18 0:01 
AnswerRe: MVVM knockoutjs Grid Pin
Afzaal Ahmad Zeeshan6-May-18 3:04
professionalAfzaal Ahmad Zeeshan6-May-18 3:04 
QuestionBeginner, no pc Pin
Rufus1827-Apr-18 0:29
Rufus1827-Apr-18 0:29 
AnswerRe: Beginner, no pc Pin
F-ES Sitecore27-Apr-18 1:54
professionalF-ES Sitecore27-Apr-18 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.