Commit 458376b3 authored by Yue's avatar Yue

Update HoMer00PS_B.psyexp

parent 61aa3c08
......@@ -430,6 +430,30 @@
<Param name="wrapWidth" updates="constant" val="" valType="code"/>
</TextComponent>
<CodeComponent name="code_2">
module.exports = function ascii_lowercase () {
const length = 26
let i = 65 + length + 6
return [...Array(length)]
.reduce(function (accumulator) {
return accumulator + String.fromCharCode(i++)
}, '')
}
module.exports = function ascii_uppercase () { // eslint-disable-line camelcase
// original by: Yury Shapkarin (https://shapkarin.me)
// example 1: ascii_uppercase()
// returns 1: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
const length = 26
let i = 65
return [...Array(length)]
.reduce(function (accumulator) {
return accumulator + String.fromCharCode(i++)
}, '')
}
<Param name="Begin Experiment" updates="constant" val="import string&amp;#10;allLetters = list(string.ascii_lowercase+string.ascii_uppercase)&amp;#10;&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="&amp;#10; // add-on: list(s: string): string[]&amp;#10; function list(s) {&amp;#10; // if s is a string, we return a list of its characters&amp;#10; if (typeof s === 'string')&amp;#10; return s.split('');&amp;#10; else&amp;#10; // otherwise we return s:&amp;#10; return s;&amp;#10; }&amp;#10; &amp;#10; import * as string from 'string';&amp;#10;var allLetters;&amp;#10;allLetters = list((string.ascii_lowercase + string.ascii_uppercase));&amp;#10;" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="textFill = &quot;&quot;;&amp;#10;" valType="extendedCode"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment