If something like this is put through Babili:
let pre = false;
let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let randomNumber = Math.floor(Math.random() * 5);
for(let i = 0; i < array.length; i++)
if(randomNumber === array[i]){
pre = true;
break;
}
if(!pre)
console.log("Hello");
Then it splits out:
"use strict";for(var array=[1,2,3,4,5,6,7,8,9,10],randomNumber=Math.floor(5*Math.random()),i=0;i<array.length;i++)if(randomNumber===array[i]){break}pre||console.log("Hello");
The above mentioned code will fail as the variable pre is not defined but is used in a "strict" environment. There are other ways to implement the above code like using a return instead of break. But this methods fails. Looks like a BUG
If something like this is put through Babili:
Then it splits out:
The above mentioned code will fail as the variable
preis not defined but is used in a"strict"environment. There are other ways to implement the above code like using areturninstead ofbreak. But this methods fails. Looks like a BUG