mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
Created these while experimenting with LibJS. Might as well bring them into the tree and increase our coverage.
20 lines
446 B
JavaScript
20 lines
446 B
JavaScript
// For loop with expression init (should NOT be wrapped in ExpressionStatement)
|
|
function for_expression_init() {
|
|
for (x = 0; x < 10; x++) {}
|
|
}
|
|
|
|
// For loop with variable declaration init
|
|
function for_declaration_init() {
|
|
for (var i = 0; i < 10; i++) {}
|
|
}
|
|
|
|
// For loop with let declaration init
|
|
function for_let_init() {
|
|
for (let i = 0; i < 10; i++) {}
|
|
}
|
|
|
|
// For loop with no init
|
|
function for_no_init() {
|
|
for (; x < 10; x++) {}
|
|
}
|