Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Solution(lines, trafos) {
- this.lines = lines;
- this.trafos = trafos;
- this.total = function(sol) {
- return parseInt(this.lines) + parseInt(this.trafos);
- }
- }
- // Kommer att ge:
- {
- lines: 2,
- trafos: 3
- }
- // Hur lyckas jag evaluera this.total innan jag returnerar så att resultatet blir:
- {
- lines: 2,
- trafos: 3,
- total: 5
- }
Advertisement
Add Comment
Please, Sign In to add comment