flaska/temp.mjs

23 lines
541 B
JavaScript
Raw Normal View History

2024-11-03 09:16:11 +00:00
function test1() {
delete Object.prototype
}
var test2 = new Function(`
delete Object.prototype
`)
var test3 = new Function(`
'use strict'
delete Object.prototype
`)
var test4 = new Function(`
'use strict'
return function() {
delete Object.prototype
}
`)
try { test1() } catch (err) { console.log('test1', err.message) }
try { test2() } catch (err) { console.log('test2', err.message) }
try { test3() } catch (err) { console.log('test3', err.message) }
try { test4()() } catch (err) { console.log('test4', err.message) }