Can classes in es6 call their own methods?

I want to initialize this.detailImgUrls with concatImgUrls () when initializing the object. Which of the following methods should I use?

function concatImgUrls() {
    return "haha";
}

export default class Car{
    constructor(data){
        this.address = data.address;
        this.displacement = data.displacement + "L";
        
        this.detailImgUrls = concatImgUrls();

    }
}
export default class Car{
    constructor(data){
        this.address = data.address;
        this.displacement = data.displacement + "L";
        this.detailImgUrls = this.concatImgUrls();

    }

    concatImgUrls() {
        return "haha";
    }


}

I tried both, but in the second case, the object method is supposed to be used by the instantiated object, not in the class.

Es6
Apr.01,2021

how es6 is implemented, prototype chain, the reason is known

use is self-determined, and every strongly typed language is not limited to death

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb21a0-4817f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb21a0-4817f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?