in Education by
I'm getting the following error when trying to compile my code on Angular 7.2.0 with TypeScript version 3.2.2: error TS1005: ',' expected.**… It is linked to the line where I try to declare a const object. addAppareil(name: string status: string) { const appareilObject = { id: 0, name: '', status: '' }; } I don't get why it isn't correct, I've tried a lot of ways to do this but nothing worked good and nothing on the web that matches my problem. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You forget to put comma in arguments: addAppareil(name: string, status: string) { // <---- In This Line }

Related questions

0 votes
    I'm getting the following error when trying to compile my code on Angular 7.2.0 with TypeScript version ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    Check out this example code I saw: import * as React from 'react'; const Count: React.FunctionComponent ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    I'm relatively new to C++, recently moved from C# and Java (and before that, used to work in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Take the following code snippet: #include std::vector good; //illegal, because std::allocator is ill-formed ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    Is the following code supposed to compile? #include void foo() { const std::pair x = {1, 2}; ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Is the following code supposed to compile? #include void foo() { const std::pair x = {1, 2}; ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I have a C project where all code is organized in *.c/*.h file pairs, and I need to define ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I have a C project where all code is organized in *.c/*.h file pairs, and I need to define ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    What is the difference between const and macro?...
asked Jan 23, 2021 in Technology by JackTerrance
0 votes
    What is the meaning of the below declarations? 1. const int a; 2. int const a; 3. const int *a; 4. int * const a; 5. int const * a const;c...
asked Jan 21, 2021 by JackTerrance
0 votes
    What is the difference between const and readonly in C#?...
asked Jan 16, 2021 in Technology by JackTerrance
0 votes
    While developing "widgets" (objects, which - rendered - use some custom javascript files), I faced the need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I've set up Angular 2 (RC4) with angular-cli and use [email protected]. I installed jQuery with npm ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 10, 2022 in Education by JackTerrance
0 votes
    From the server, I receive this JSON object. It represents an organigram of a company and the associated ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I create a project with "dotnet new angular". When a breakpoint is set on a Typescript instruction, it ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 2, 2022 in Education by JackTerrance
...