{"id":"id_8bd7d004_60e7_4818_bdaa_7d91ab6462bf","name":"Palindrome","config":{"lang":"javascript","showFunctions":true,"showGenCode":true},"main":{"rawId":"main","name":"main","parameters":[],"tpe":"Void","statements":[{"id":"id_ceb5fe8e_77a8_4306_839d_59c9cee6dd18","@type":"Begin"},{"id":"id_e1572df4_4d91_4069_94a6_80c1874c3b2a","name":"str","tpe":"String","initValue":null,"@type":"Declare"},{"id":"id_fe746f41_2228_41f7_9b41_fae786d75de4","name":"str","prompt":null,"@type":"Input"},{"id":"id_e00e4488_22a9_4888_b753_54a0aebc8a26","value":"\"Palindrome: \" + isPalindrome(str)","newline":true,"@type":"Output"},{"id":"id_f34b9766_0d8d_4cb9_99dd_221de1f413e9","maybeValue":null,"@type":"Return"}]},"functions":[{"rawId":"id_43176bcc_7c90_4d5f_afee_493ef683e194","name":"isPalindrome","parameters":[{"id":"4c78ad7f-6fd6-4a2f-8efb-fa4eda6e7555","name":"s","tpe":"String"}],"tpe":"Boolean","statements":[{"id":"id_cf913089_dd5c_4755_92b3_890608d4146b","@type":"Begin"},{"id":"id_453d0e31_7b41_4984_9c24_2bee908e89a8","name":"res","tpe":"Boolean","initValue":"true","@type":"Declare"},{"id":"id_2082e129_f30c_41f0_90e4_9c1218656ffe","name":"mirrorIdx","tpe":"Integer","initValue":null,"@type":"Declare"},{"id":"id_72d68f30_f4b5_418c_b7c4_51ca65c1fdb1","varName":"i","start":"0","incr":"1","end":"length(s)-1","body":{"id":"id_361b9120_6f85_4a6e_961e_eb072ddb0745","statements":[{"id":"id_c2da7b74_d4fc_414f_b50d_ea1cf773d662","name":"mirrorIdx","value":"length(s)-i-1","@type":"Assign"},{"id":"id_0a084dbf_c40a_4cf7_bd46_7ff97c945b45","condition":"charAt(s, i) != charAt(s, mirrorIdx)","trueBlock":{"id":"id_b0f54aff_916b_4650_9e6c_6f8ff58b0b59","statements":[{"id":"id_fd8c710d_bd61_45f3_ac1d_5b4355d17e6a","name":"res","value":"false","@type":"Assign"}]},"falseBlock":{"id":"id_e2775334_71ef_4fed_b8d4_771b77229c68","statements":[]},"@type":"If"}]},"@type":"ForLoop"},{"id":"id_aad60118_1e0d_44ec_9dd6_59ef9fd022d2","maybeValue":"res","@type":"Return"}]}],"version":"0.1"}
Settings