What language is this code snippet?

Hi, I'm documenting a change in a web page (not written by my company)and encountered the following snippet. What language is it? JavaScript? Thanks.

(function() { function forEach(responses, cb) { Object.keys(responses).forEach(function(adUnitCode) { var response = responses[adUnitCode]; response.bids.forEach(function(bid) { cb(adUnitCode, bid); }); }); } var winners = pbjs.getAllWinningBids(); var output = []; forEach(pbjs.getBidResponses(), function(code, bid) { output.push({ bid: bid, adunit: code, adId: bid.adId, bidder: bid.bidder, time: bid.timeToRespond, cpm: bid.cpm, msg: bid.statusMessage, rendered: !!winners.find(function(winner) { return winner.adId==bid.adId; }) }); }); forEach(pbjs.getNoBids && pbjs.getNoBids() || {}, function(code, bid) { output.push({ msg: "no bid", adunit: code, adId: bid.bidId, bidder: bid.bidder }); }); if (output.length) { if (console.table) { console.table(output); } else { for (var j = 0; j < output.length; j++) { console.log(output[j]); } } } else { console.warn('NO prebid responses'); } })(); 

Open in new window

LVL 4
Stephen KairysTechnical Writer - ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Looks like Javascript.
Sam JacobsDirector of Technology Development, IPMCommented:
Yes, that is JavaScript.
Gertone (Geert Bormans)Information ArchitectCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Stephen KairysTechnical Writer - ConsultantAuthor Commented:
Thanks, everyone!
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
Follow-up: Is the below also Javascript:

<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
<script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%PATTERN:url%%";
  ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;

  try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {
    console.log(e);
  }
</script>

Open in new window

Zakaria AcharkiAnalyst DeveloperCommented:
Yes, javascript too, I would suggest to you two websites helps you to identify the programming language of the given code :

This website gives you logical results :

https://creativetechguy.com/utilityprograms/codedetector

This algorithm requires a quick sing up but gives the best result :

https://algorithmia.com/algorithms/PetiteProgrammer/ProgrammingLanguageIdentification
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.