# Very simple JS

**URL:** <https://forum.kirupa.com/t/very-simple-js/62757>\
**Category:** Uncategorized\
**Created:** [August 31, 2004, 2:55am UTC](https://forum.kirupa.com/t/very-simple-js/62757 "2004-08-31T02:55:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjah](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@benjah](https://forum.kirupa.com/u/benjah)\
**Post date:** [August 31, 2004, 2:55am UTC](https://forum.kirupa.com/t/very-simple-js/62757/1 "2004-08-31T02:55:56Z")

</div>

ok, i know i ask too many questions, but i am getting a book on JS this weekend so it will all be over soon.

my question this time is, if i want more things to happen after and “if/else” satement, how do i do that? for instance:

```auto
 
var yourFeeling=prompt("'yes' or 'no'","");
 if (yourFeeling=="no")
  var yourChange=prompt("what made you feel differently?","");
 else
 if (yourFeeling=="yes")
  alert("So you still are feeling " + how_you_are);
 else
  alert("Too cool to type 'yes' or 'no?'");

```

if i want to make something that responds to var yourChange (I.E. alert(yourChange + " is what made your change?"); ) how do i do that? if i add anything more after any of the “if/else” things (other than more “if/else” things) the function doesn’t work.

sorry if that is confusing wording, but thanks for the help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 31, 2004, 3:22am UTC](https://forum.kirupa.com/t/very-simple-js/62757/2 "2004-08-31T03:22:53Z")

</div>

erm… I’m no JS guru but in any other coding language… you would need brackets { } to block it off…

```auto

var yourFeeling=prompt("'yes' or 'no'","");

if (yourFeeling=="no") {
  var yourChange=prompt("what made you feel differently?","");
}
else {
 if (yourFeeling=="yes") {
  alert("So you still are feeling " + how_you_are);
}

```

of course I could be wrong… but JS isn’t to much diff from other coding.
