For a specific folder, I need to list all files with extension .js even if nested in subfolders at any level.
.js
The result for the output console should b
The simple option is to use the .Name property of the FileInfo item in the pipeline and then remove the extension:
.Name
FileInfo
Get-ChildItem -Path "C:\code\" -Filter *.js -r | % { $_.Name.Replace( ".js","") }