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

  • SEARCH
  • Home
  • 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 7862473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:08:30+00:00 2026-06-02T23:08:30+00:00

So for my cit class I have to write a pig Latin converter program

  • 0

So for my cit class I have to write a pig Latin converter program and I’m really confused on how to use arrays and strings together.
The rules for the conversion are simple, you just move the first letter of the word to the back and then add ay. ex: hell in English would be ellhay in pig Latin
I have this so far:

<form name="form">
<p>English word/sentence:</p> <input type="text" id="english" required="required" size="80" /> <br />
<input type="button" value="Translate!" onClick="translation()" />
<p>Pig Latin translation:</p> <textarea name="piglat" rows="10" cols="60"></textarea>
</form>

<script type="text/javascript">
<!--
fucntion translation() { 
var delimiter = " ";
    input = document.form.english.value;
    tokens = input.split(delimiter);
    output = [];
    len = tokens.length;
    i;

for (i = 1; i<len; i++){
    output.push(input[i]);
}
output.push(tokens[0]);
output = output.join(delimiter);
}
//-->
</script>

I’d really appreciate any help I can get!

  • 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-02T23:08:31+00:00Added an answer on June 2, 2026 at 11:08 pm

    I think the two things you really need to be looking at are the substring() method and string concatentation (adding two strings together) in general. Being that all of the objects in the array returned from your call to split() are strings, simple string concatentation works fine. For example, using these two methods, you could move the first letter of a string to the end with something like this:

    var myString = "apple";
    
    var newString = mystring.substring(1) + mystring.substring(0,1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a class like this: public class ThingManager { List<SomeClass> ItemList; public
I do have List<ColumnDiff> columnDiffList of public class ColumnDiff { public string columnName; public
Coming from C# it was quite common for me to write a class that
I have a class with overloaded constructor (C#) It can be initialized in few
I have several classes (A, B, C, ...) that all use a List<AnotherClass> to
I have written a simple http server to handle POST requests: class MyHandler( BaseHTTPServer.BaseHTTPRequestHandler):
we have a problem [cit.] I need to assign a callback dynamically within a
I have the following: typedef std::function<void(const EventArgs&)> event_type; class Event : boost::noncopyable { private:
In C, C++, C# you can have arrays of a certain type like int[].
I have a program meant to simulate some probability problem (A variation of the

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.