Webform 8 - How can I make a text field value be A if a select value is 1? In Webform 8 I am trying to figure out how to populate a text field with a value based on what is chosen on a drop down.

For example:
Select Value are states
If user selects Deleware then the value for the text field Ratified is equal to 1.

How can I achieve this in Webform 8x?

In Webform 7x I am able to do this with the Conditionals tab but can't seem to be able to figure out how to do this in Webform 8.
You have to use JS, go to settings - CSS/JS tab, write code in CUSTOM JAVASCRIPT textarea.

Some code for reference. I got a text input (id is edit-name), a select (id is edit-gender), the id you find enter 'F12' to see. ID is automatically generated by Webform.
When I select male, the text input will appear male.

(function ($, Drupal) {'use strict';$(document).ready(function(){
  'use strict';
  var name = $("#edit-name");
  var gender = $("#edit-gender");
  var duty = $("#edit-duty-select"); 
  function ab() {if (gender.val()==='male'){name.val("male");} else {name.val("girl")}};  
  gender.change(ab);  // add a Listener to select
});  
})(jQuery, Drupal);