guest271314 (2019-03-25T20:35:06.000Z)
guest271314 at gmail.com (2019-03-25T20:42:38.564Z)
>```js >let a = 10 >a += '1' // ‘101’ >// or >a += undefined // NaN >``` What if ```"101"``` is the expected result? Would ```"use static typing"``` similar to > Strict mode for scripts > ><https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. suffice?
guest271314 at gmail.com (2019-03-25T20:42:13.545Z)
>```js >let a = 10 >a += '1' // ‘101’ >// or >a += undefined // NaN ``` What if ```"101"``` is the expected result? Would ```"use static typing"``` similar to > Strict mode for scripts > ><https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. suffice?
guest271314 at gmail.com (2019-03-25T20:40:12.834Z)
> js > ```let a: number = 10``` > ```a += ‘1’ // Error, cannot convert type string to type number.``` What if ```"101"``` is the expected result? Would ```"use static typing"``` similar to > Strict mode for scripts > ><https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. suffice?
guest271314 at gmail.com (2019-03-25T20:39:56.896Z)
> js > ```let a: number = 10``` > ```a += ‘1’ // Error, cannot convert type string to type number.``` What if ```"101"``` is the expected result? Would ```"use static typing"``` similar to > Strict mode for scripts > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. suffice?
guest271314 at gmail.com (2019-03-25T20:39:40.548Z)
> js > ```let a: number = 10``` > ```a += ‘1’ // Error, cannot convert type string to type number.``` What if ```"101"``` is the expected result? Would ```"use static typing"``` similar to > Strict mode for scripts <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. suffice?
guest271314 at gmail.com (2019-03-25T20:38:51.093Z)
> js > ```let a: number = 10``` > ```a += ‘1’ // Error, cannot convert type string to type number.``` What if ```"101"``` is the expected result? Would > Strict mode for scripts <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. ```"use static typing"``` suffice?
guest271314 at gmail.com (2019-03-25T20:37:50.840Z)
> js > ```let a: number = 10``` > ```a += ‘1’ // Error, cannot convert type string to type number.``` What if ```"101"``` is the expected result? Would > Strict mode for scripts <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Strict_mode_for_scripts> > To invoke strict mode for an entire script, put the exact statement ```"use strict";``` (or ```'use strict';```) before any other statements. ```"use static typing"``` suffice?