javascript trim start and end spaces code example Example: javascript trim spaces value = value.trim();