Question from the Angular 4 (legacy) test

What is the output of the following code? `var a = 1; var b = 2; var c = a + b; console.log(c);`

Expert

What does the following code do?

import {Service} from '@angular/core';
import {Http}    from '@angular/http';
import {Issue}   from './issue';

@Injectable()
export class HeroService {
    constructor(private http: Http) {
    }

    getList(): Promise<Issue[]> {
        return this.http.get('/issues/')
            .toPromise()
            .then((response) => {
                return response.json() as Issue[];
            })
            .catch(this.handleError);
    }

    private handleError(error: any): Promise<any> {
        console.error('An error occurred', error);
        return Promise.reject(error.message || error);
    }
}
Author: Mathieu RobinStatus: PublishedQuestion passed 457 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!