Ribbing question

Hi! I’m new.:mrgreen:

I am knitting a scarf and it is ribbed. The pattern line reads
K1, (K2,P2 to last st), K1

So I have interpreted that to mean knit one, then knit 2 then perl 2 alternating until the last stitch, knit the last stitch. My question is, do I have to knit the knits and perl the perls to make it ribbed? Or can I just simply keep repeating this line when I get to a new row?

Thanks!

If they gave you a multiple of 4 plus 2 you can work that same row over and over to make the pattern. But what it works out to be is always knit the end stitches and for the rest you are working knits over knits and purls over purls. So you end up with one stitch of garter on each side and the rest ribbed in 2X2 rib.

Thanks! I kept repeating it and the ribbing is working! Yay!