BananaMaster

38 - Nested for loops, Price Matrix (JS lessons)

If you forgot something โ€” click to go to the lesson.

๐Ÿ“˜ Task: Price Matrix

The user enters a number from 1 to 10. After clicking the button, the following result should be displayed:

$1
( $11 $21 $31 $41 $51 )

$2
( $12 $22 $32 $42 $52 )

$3
( $13 $23 $33 $43 $53 )

๐Ÿ“ How it works:

๐Ÿงช Example:

Input: 3

$1
( $11 $21 $31 $41 $51 )

$2
( $12 $22 $32 $42 $52 )

$3
( $13 $23 $33 $43 $53 )

๐Ÿ“ HTML structure of the result:

<div>
$2
( $12 $22 $32 $42 $52 )
</div>

๐Ÿ“Œ Important: