prefer-const
This commit updates the docs examples to be compatible with the `prefer-const` tslint rule. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
use strict
By default, TypeScript will emit `"use strict"` directives, so it is not necessary to include `'use strict'` in `.ts` files: https://www.typescriptlang.org/docs/handbook/compiler-options.html#:~:text=--noImplicitUseStrict PR Close #38143
PR Close #23234