Why does the following creates divs without nesting? I want .squares to be within .rows
- for (var i = 1; i <= rows; i++) {
div(class='row row-'+i)
- for (var j = 1; j <= cols; j++) {
.div(class='square square-'+j)
- }
- }
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just guessing, you might need to indent your second for loop to sit inside the first div
EDIT: This code is working for me as expected, with nested divs