You asked

How does the nikon af s dx 35mm f 1 8g compare for portraits on an aps c nikon?

Here is what the site says about that.

From Nikon AF-S DX 35mm f/1.8G: Nikon AF-S DX 35mm f/1.8G: A prime lens by Nikon for APS-C cameras, 35mm f/1.8. Specs - Maker: Nikon - Focal length: 35mm (prime) - Maximum aperture: f/1.8 - Made for: APS-C sensors - Mounts: Nikon F - Stabilised: no - Autofocus: yes What it frames like - On APS-C (Nikon F): like 52mm on full frame; f/1.8 gives about the depth of field of f/2.7 there. - On the larger-sensor bodies of Nikon F: ...

From Nikon AF-S DX Micro 40mm f/2.8G: Nikon AF-S DX Micro 40mm f/2.8G: A prime lens by Nikon for APS-C cameras, 40mm f/2.8. A cheap DX macro lens.

Quoted from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.