# JAVA (plss help)

**URL:** <https://forum.freecodecamp.org/t/java-plss-help/461541>\
**Category:** General\
**Created:** [May 23, 2021, 3:34pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541 "2021-05-23T15:34:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJTALKS](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tjtalks/32/218817_2.png) [@TJTALKS](https://forum.freecodecamp.org/u/TJTALKS)\
**Post date:** [May 23, 2021, 3:34pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/1 "2021-05-23T15:34:31Z")

</div>

```javascript
var myStr;'\"FirstLine\n\t\SecondLine\n\ThirdLine"'; // Change this line

```

Q-Assign the following three lines of text into the single variable `myStr` using escape sequences.

> FirstLine  
> \SecondLine  
> ThirdLine

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [May 23, 2021, 3:50pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/2 "2021-05-23T15:50:12Z")

</div>

First off, when you post a question about a curriculum problem, please use the `Get Help -> Ask for Help` button - it will post your code and a link to the problem making it easier to help you.

Secondly, in your title you say, “JAVA (plss help)”. Understand that this is JavaScript, not Java, which is a completely different language. They are no more the same language than Spanish and Italian - related, but not the same.

OK, this:

```auto
var myStr;’“FirstLine\n\t\SecondLine\n\ThirdLine”’; // Change this line

```

There are a few problems here.

1. You never assign the variable. Assigning a variable should be like `var x =` But you have a semicolon after your variable name, not a `=`.
2. You have some extra quote signs in there. You start out with this: `’“`. You don’t both in this case, choose one or the other, single or double quotes.
3. Why in this - `\SecondLine` - are you trying to escape the “S”? The same with “T” a little later. Remember that in your string, if you want to display a “`\`” that it too must be escaped.

When I fix those things, your code passes for me.

---

<div class="post-metadata">

**Author:** ![drown](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@drown](https://forum.freecodecamp.org/u/drown)\
**Post date:** [May 23, 2021, 3:54pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/3 "2021-05-23T15:54:12Z")

</div>

You seem to be on the right path. However, you may try the below solution. As far as I can understand from your query.

FULL SOLUTION REDACTED

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [May 23, 2021, 3:58pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/4 "2021-05-23T15:58:06Z")

</div>

Please don’t hand out answers. We’re here to help people understand and fix their code.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [May 23, 2021, 4:33pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/5 "2021-05-23T16:33:42Z")

</div>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

---

<div class="post-metadata">

**Author:** ![TJTALKS](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tjtalks/32/218817_2.png) [@TJTALKS](https://forum.freecodecamp.org/u/TJTALKS)\
**Post date:** [May 23, 2021, 5:17pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/6 "2021-05-23T17:17:15Z")

</div>

kkk sir now i will keep this in mind

it helped me a lot.

---

<div class="post-metadata">

**Author:** ![TJTALKS](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tjtalks/32/218817_2.png) [@TJTALKS](https://forum.freecodecamp.org/u/TJTALKS)\
**Post date:** [May 23, 2021, 5:35pm UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/7 "2021-05-23T17:35:44Z")

</div>

got it

thnk u sir. …

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [November 22, 2021, 5:36am UTC](https://forum.freecodecamp.org/t/java-plss-help/461541/8 "2021-11-22T05:36:11Z")

</div>

Closed on November 22, 2021, 5:36am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
