Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8992073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:52:16+00:00 2026-06-15T22:52:16+00:00

My Code: <script type=text/javascript> for each ( var movie in [‘Endhiran The Robot’,’Shivaji The

  • 0

My Code:

<script type="text/javascript">
for each ( var movie in ['Endhiran The Robot','Shivaji The Boss','Anbulla Rajinikanth'] )
    document.writeln(movies + "<br/>");
</script>

In Firefox, I am getting the output as

Endhiran The Robot
Shivaji The Boss
Anbulla Rajinikanth

But in IE9 and Chrome Version 23.0.1271.95 m, for each is not working and nothing is written on the document

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:52:17+00:00Added an answer on June 15, 2026 at 10:52 pm

    There is no for each in JavaScript, that was a non-standard extension.

    There is the new ES5 forEach function, which is well supported in modern browsers although of course not in older ones:

    ['Endhiran The Robot','Shivaji The Boss','Anbulla Rajinikanth'].forEach(function(movie) {
        document.writeln(movie + "<br/>");
    });
    

    Several other options over in this other answer here on Stack Overflow. (The question mentions jQuery, but the answer covers both plain JavaScript and jQuery options.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Appreciate some insight given the following code: <script type=text/javascript> $(document).ready(function() { var soapEnv =
I have this code <html> <head> <script src=jquery-1.7.2.min.js type=text/javascript></script> <script src=jquery-ui-1.8.20.custom.min.js type=text/javascript></script> <script type
<html> <body> <script src=raphael.js type=text/javascript></script> <script>// Each of the following examples create a canvas
Here's my code: <script type=text/javascript> (function() { window.PinIt = window.PinIt || { loaded:false };
look at this code, <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <script> function change() {
I have the following jQuery script running on my page: <script type=text/javascript charset=utf-8 src={{
I'm using jQuery Raty and I have the following script: <script type=text/javascript charset=utf-8 src={{
I use BBC carousel http://www.bbc.co.uk/glow/docs/1.7/furtherinfo/widgets/carousel/ . Here is my script code <script src=/themes/javascript/glow/1.7.7/core/core.js type=text/javascript></script>
I have this code function calculateTotal() { var total = 0; $(.quantity).each(function() { if
Please someone Fix this Javascript Code. This script actually reads the URL Parameter and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.