What do you want to save?
Add Code snippet
New code examples in category TypeScript
-
Feynman 2021-08-30 04:43:02
angular font awesome
//install in your project directory npm install --save @fortawesome/fontawesome-free // in angular.json add in the 'build' section the following lines in 'styles' and 'scripts' "styles": [ "node_modules/@fortawesome/fontawesome-... Add solution -
Heartpeace 2021-08-30 03:20:03
java check if element exists in array
import java.util.Arrays; // For String String[] array = {"Boto", "Nesto", "Lepta"}; String toSearch = "Nesto"; // Inline if (Arrays.toString(array).contains(toSearch)) { // Do something if it's found } // Multi ... Add solution -
Quillandeasel 2021-08-30 02:52:01
Type 'null' is not assignable to type 'ImageSourcePropType'.
// You can now use the non-null assertion operator that is here exactly // for your use case. // It tells TypeScript that even though something looks like it could // be null, it can trust you that it's not: let name1:string = person.name!; // ... Add solution -
Sayantan G. 2021-08-30 02:28:01
Given an array of integers, every element appears thrice except for one which occurs once.
let contacts = new Map() contacts.set('Jessie', {phone: "213-555-1234", address: "123 N 1st Ave"}) contacts.has('Jessie') // true contacts.get('Hilary') // undefined contacts.set('Hilary', {phone: "617-555-4321", address: &qu... Add solution -
Karthik Malla 2021-08-29 20:50:02
Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines.
var chessBoard= '', size= 8, c; for(var i = 0 ; i < size ; i++) { c= i%2 ? '# ' : ' #'; for(var j = 0 ; j < size/2 ; j++) { chessBoard+= c; } chessBoard+= '\n'; } console.log(chessBoard); Add solution
Best helpers
C.B
+5
Beatriz LO
+5
Matt McGuire
+5
Stacey
+5
Dan Aloni
+5
Mostafa 36a2
+5
RiCo
+5
Binarus
+5
Srihari
+5
Khrustzh
+5
Styne666
+5
Siranush A
+5
Newby
+5
Youssef
+5
Ron Short
+5
Cat812
+5
Alkasm
+5
Alexvoda
+5