# Question about "secure code - 4" Weweb element

**URL:** <https://community.weweb.io/t/question-about-secure-code-4-weweb-element/3676>\
**Category:** How do I?\
**Created:** [July 26, 2023, 9:07am UTC](https://community.weweb.io/t/question-about-secure-code-4-weweb-element/3676 "2023-07-26T09:07:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [July 29, 2023, 3:45am UTC](https://community.weweb.io/t/question-about-secure-code-4-weweb-element/3676/4 "2023-07-29T03:45:31Z")

</div>

Sure! The code I use was (this is for on change workflow on the first box), replace with your own variable values. Then do something very similar to the second and third box~

// Access the global variables  
let code1Value = variables[‘’];  
let code2Value = variables[‘’];  
let code3Value = variables[‘’];  
let code4Value = variables[‘’];

// Check if the length of code1Value is more than 1  
if (code1Value.length \> 1) {  
// If it is, add the second character to code2Value  
code2Value += code1Value[1];  
// And remove it from code1Value  
code1Value = code1Value[0];  
}

// Check if the length of code2Value is more than 1  
if (code2Value.length \> 1) {  
// If it is, add the second character to code3Value  
code3Value += code2Value[1];  
// And remove it from code2Value  
code2Value = code2Value[0];  
}

// Check if the length of code3Value is more than 1  
if (code3Value.length \> 1) {  
// If it is, add the second character to code4Value  
code4Value += code3Value[1];  
// And remove it from code3Value  
code3Value = code3Value[0];  
}

// Update the global variables  
variables[‘’] = code1Value;  
variables[‘’] = code2Value;  
variables[‘’] = code3Value;  
variables[‘’] = code4Value;

// Return the updated global variables  
return {  
code1Value: variables[‘’],  
code2Value: variables[‘’],  
code3Value: variables[‘’],  
code4Value: variables[‘’]  
};

---

_[View the full topic](https://community.weweb.io/t/question-about-secure-code-4-weweb-element/3676)._
