I don't dislike your idea but it is strange in JS but you can do it, don't worry