What can be considered as an artifact
Artifact is an abstraction. It could be anything that's produced by somebody else. In Bulgaria for example we're making artifacts for the winter time ( it's called 'compot') . Basically it's an artifact, it was produced by my grandmother and could be used by me :)

Same goes into the IT world, but with one small difference.

The Java artifacts are a little bit more special, since Java is a static language and before the run phase you would have those compiled artifacts - *.jar files. After that you could reference them during the 'run' phase. This is the reason why they are always pointed as the most straightforward artifact example, the java compiler will produce them. 

One major distinguishment between my grandmother's artifacts and Java's ones is that it's a good practice to have a version for each artifact, that way you could easily switch them and see what works and what does not.

JavaScript and Python are dynamic languages, they do not have any compiled artifacts like Java, you could just refer to the '.py' file.

As a summary an artifact could be anything:
from tar.gz to a jar file, but it must always be versioned :) Of course the versioning might come during a later stage, like a docker image tag, but the principle still remains.